GNOME Bugzilla – Bug 164269
g_enum_complete_type_info example code
Last modified: 2005-01-17 03:20:39 UTC
This bug has been opened here: http://bugs.debian.org/289053 "In the gobject reference manual under "Enums and Flags", g_enum_complete_type_info says for the values parameter that The array is terminated by a struct with all members being 0. But the example code is static const GEnumValue values[] = { { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" }, { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" } }; g_enum_complete_type_info (type, info, values); Perhaps there should be a "{ 0 }" element at the end of that array. (I only noticed this while reading it, I haven't actually tried to use the function.)"
trivial patch: RCS file: /cvs/gnome/glib/docs/reference/gobject/tmpl/enumerations_flags.sgml,v retrieving revision 1.17 diff -u -r1.17 enumerations_flags.sgml --- docs/reference/gobject/tmpl/enumerations_flags.sgml 21 Oct 2003 21:49:21 -0000 1.17 +++ docs/reference/gobject/tmpl/enumerations_flags.sgml 16 Jan 2005 18:44:25 -0000 @@ -254,7 +254,8 @@ { static const GEnumValue values[] = { { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" }, - { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" } + { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" }, + { 0, NULL, NULL } };
2005-01-16 Matthias Clasen <mclasen@redhat.com> * gobject/tmpl/enumerations_flags.sgml: Fix an example. (#164269, Sebastian Bacher)