mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 00:16:15 +01:00
9ba17d511e
It is possible, when using GTK-Doc, to mark sections of an enumeration type as "private": the values are there, but they are not documented, and GTK-Doc won't complain about missing symbols: typedef enum { /*< private >*/ MY_FOO_PRIVATE, /*< public >*/ MY_FOO_VALUE_A, MY_FOO_VALUE_B, /*< private >*/ MY_FOO_VALUE_C, MY_FOO_VALUE_D } MyFooValue; The glib-mkenums parser also allows skipping enumeration values, using a slightly different syntax: typedef enum P MY_BAR_PRIVATE, /*< skip >*/ MY_BAR_VALUE_A, MY_BAR_VALUE_B } MyBarValue; The annotation must sit on the same line as the enumeration value. Both GTK-Doc and glib-mkenum use the same trigraph syntax, but slightly different keys. This makes combining them slightly redundant, but feasible. All would be well and good, except that glib-mkenum will generate a warning for lines it does not understand — and that includes the GTK-Doc annotation trigraph, which, when confronted with the MyFooValue enumeration above, will result in a warning like: glib-mkenums: myfoo.h:2: Failed to parse ` /*< private >*/ ' glib-mkenums: myfoo.h:5: Failed to parse ` /*< public >*/ ' glib-mkenums: myfoo.h:9: Failed to parse ` /*< private >*/ ' Of course, we could make glib-mkenum ignore any trigraph comment on a stand alone line, but it would probably be better to ensure that both glib-mkenums and gtk-doc behave consistently with each other, and especially with the maintainer's intent of hiding some values from the user, and reserving them for internal use. So we should ensure that glib-mkenums automatically skips all the enumeration values after a "private" flag has been set, until it reaches a "public" stanza. https://bugzilla.gnome.org/show_bug.cgi?id=782162 |
||
---|---|---|
.. | ||
tests | ||
.gitignore | ||
ChangeLog | ||
gatomicarray.c | ||
gatomicarray.h | ||
gbinding.c | ||
gbinding.h | ||
gboxed.c | ||
gboxed.h | ||
gclosure.c | ||
gclosure.h | ||
genums.c | ||
genums.h | ||
glib-genmarshal.c | ||
glib-mkenums.in | ||
glib-types.h | ||
gmarshal.c | ||
gmarshal.h | ||
gmarshal.list | ||
gobject_gdb.py | ||
gobject_probes.d | ||
gobject_trace.h | ||
gobject-autocleanups.h | ||
gobject-query.c | ||
gobject.c | ||
gobject.h | ||
gobject.rc.in | ||
gobject.stp.in | ||
gobjectnotifyqueue.c | ||
gparam.c | ||
gparam.h | ||
gparamspecs.c | ||
gparamspecs.h | ||
gsignal.c | ||
gsignal.h | ||
gsourceclosure.c | ||
gsourceclosure.h | ||
gtype-private.h | ||
gtype.c | ||
gtype.h | ||
gtypemodule.c | ||
gtypemodule.h | ||
gtypeplugin.c | ||
gtypeplugin.h | ||
gvalue.c | ||
gvalue.h | ||
gvaluearray.c | ||
gvaluearray.h | ||
gvaluecollector.h | ||
gvaluetransform.c | ||
gvaluetypes.c | ||
gvaluetypes.h | ||
libgobject-gdb.py.in | ||
Makefile.am | ||
makefile.msc.in | ||
marshal-genstrings.pl |