-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate fundamental types code using gir #780
Conversation
01b4a85
to
d6d395e
Compare
d6d395e
to
0dc3ded
Compare
Except ExpressionWatch as it has it's get_type function exposed as part of the API only in 4.2 which can't be handled automatically until we drop support for 4.0
0dc3ded
to
ce907e5
Compare
axis_use.into_glib(), | ||
value.as_mut_ptr(), | ||
)); | ||
let value = value.assume_init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very bad, gir should assume_init only if ret.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Before merging this, we need to check the functions signatures one by one to ensure everything is properly generated & fix whatever needed. |
So I did a 1:1 check (manual implementations we had vs auto-generated ones): Here are a couple of things i noticed
Those that were not nullable in the manual bindings but are in the auto-generated ones. There are a ton of others that should really not be nullable because the constructor doesn't take a nullable variant and are nullable because of #68. So for those I would rather leave them as is for now and tackle the issue on #68
|
25cdcca
to
331f860
Compare
And add an assertion that idx < n_children
331f860
to
012aa6b
Compare
Generally looks good to me otherwise |
You can configure the return type to be not |
Sure, but most of them were like that. I plan to tackle the nullability issue just after getting those two PR merged so it's fine I guess |
Ok, let's make sure to fix that before the release though. |
Sure thing |
Will merge this & rebase the other one once the gir fix lands |
Depends on gtk-rs/gir#1294
Still needs a bit of cleanup & figure out how to handle the builder pattern, but in general it drops a bunch of manual code and that makes me happy :)