Skip to content
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

Use glib-mkenums to create the GType of all the available enums #284

Merged
merged 1 commit into from Oct 21, 2020
Merged

Use glib-mkenums to create the GType of all the available enums #284

merged 1 commit into from Oct 21, 2020

Conversation

tintou
Copy link
Contributor

@tintou tintou commented Oct 14, 2020

This allows the GObject Introspection to correctly understand the relations between all the from_string/to_string methods and the enum they belong to.

This also allows to use the right GType when dealing with flags or enums.

@ximion
Copy link
Owner

ximion commented Oct 20, 2020

Is this amount of hard-coding really necessary? Is there a bug report against gobject-introspection, so, will this issue be fixed upstream in any reasonable amount of time?
This change will also break the existing Vala API, right? Or have the methods been unavailable to Vala before?

@tintou tintou changed the title contrib/vapi: Add more metadata to put methods in their right scopes Use glib-mkenums to create the GType of all the available enums Oct 21, 2020
@tintou
Copy link
Contributor Author

tintou commented Oct 21, 2020

@ximion I indeed found the root cause of this issue: none of these enums were registered to the GObject Type system, I've added the use of glib-mkenum to generate their GType.

This allows the GObject Introspection to correctly understand the relations
between all the from_string/to_string methods and the enum they belong to.

This also allows to use the right GType when dealing with flags or enums.
@ximion
Copy link
Owner

ximion commented Oct 21, 2020

Looks like this got lost in ancient times during the cmake transition (!). Great find, and the patch looks good to!
Thanks for looking into this!

@ximion ximion merged commit 2076c11 into ximion:master Oct 21, 2020
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants