Skip to content

Conversation

jf2048
Copy link
Member

@jf2048 jf2048 commented Dec 11, 2022

GTK will probably not use this, but other libraries can enable it if they want

Fixes #1355

@jf2048
Copy link
Member Author

jf2048 commented Dec 13, 2022

cc @pbor

@pbor
Copy link
Contributor

pbor commented Dec 13, 2022

I have skimmed through the patch (I am not familiar enough with gir code to properly review)... can you show an example of how the syntax in Gir.toml would look like?

@jf2048
Copy link
Member Author

jf2048 commented Dec 13, 2022

It's just generate_variant_traits = "repr" or generate_variant_traits = "string" on the gir options (or on the type itself) and then you get traits for either serializing to int or string variant.

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.

Generate FromVariant and ToVariant for enums
3 participants