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 correct trigraphs to skip enum members. #303
Conversation
Avoid warnings like these: [14/448] Generating as-enum-types.h with a meson_exe.py custom command. WARNING: Failed to parse "/*< private >*/" in /home/mwleeds/git/gnome-software/build/../subprojects/appstream/src/as-agreement.h Based on this commit https://gitlab.gnome.org/GNOME/gnome-software/-/commit/512e606085c7e325ce6e4658346da2f3c5f2cdfc
|
This will break API documentation if merged, and the issue has actually already been fixed (again) in GLib after the original fix went missing by accident: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1870 |
|
Hmm, upon reading the gnome-software commit message, it's actually debatable whether the What do you think? Recent GLib versions definitely remove the noise when building AppStream and other libraries using the |
Okay, wasn't aware of that MR |
Are there any use cases for these enums that are external to the library? For that matter what are the use cases within libraries? |
Mostly for iterating through all the values of an enum. for (guint i = 0; i < AS_COMPONENT_KIND_LAST; i++)
g_print ("%s\n", as_component_kind_to_string ((AsComponentKind) i));It is also very useful for sanity checks: guint value = 42;
g_assert (value >= 0 && value < AS_COMPONENT_KIND_LAST);With having the By the way, in order to get rid of the warnings, GLib >= 2.67.3 is required, which admittedly is currently a very high requirement. Ironically some older versions will not show these warning too, as the warnings are actually a recent regression. |
Avoid warnings like these:
[14/448] Generating as-enum-types.h with a meson_exe.py custom command.
WARNING: Failed to parse "/< private >/" in
/home/mwleeds/git/gnome-software/build/../subprojects/appstream/src/as-agreement.h
Based on this commit
https://gitlab.gnome.org/GNOME/gnome-software/-/commit/512e606085c7e325ce6e4658346da2f3c5f2cdfc