gobject: fix G_DEFINE_TYPE_EXTENDED docs so code snippet actually compiles
authorAndres G. Aragoneses <knocte@gmail.com>
Thu, 4 Apr 2013 11:10:28 +0000 (12:10 +0100)
committerAndres G. Aragoneses <knocte@gmail.com>
Thu, 4 Apr 2013 11:11:06 +0000 (12:11 +0100)
Flags being used in the G_DEFINE_TYPE_EXTENDED sample was "0", so it
should expand to 0 as well, otherwise the compiler would bark with:
maman-bar.c: In function ‘maman_bar_get_type’:
maman-bar.c:36:53: error: ‘flags’ undeclared (first use in this function)
maman-bar.c:36:53: note: each undeclared identifier is reported only once for each function it appears in

https://bugzilla.gnome.org/show_bug.cgi?id=697250

gobject/gtype.h

index 8a1bff2..f6f6f93 100644 (file)
@@ -1406,7 +1406,7 @@ guint     g_type_get_type_registration_serial (void);
  *                                        (GClassInitFunc) gtk_gadget_class_intern_init,
  *                                        sizeof (GtkGadget),
  *                                        (GInstanceInitFunc) gtk_gadget_init,
- *                                        (GTypeFlags) flags);
+ *                                        0);
  *       {
  *         const GInterfaceInfo g_implement_interface_info = {
  *           (GInterfaceInitFunc) gtk_gadget_gizmo_init