Add GObjectClass flag CLASS_HAS_PROPS_FLAG
authorAlexander Larsson <alexl@redhat.com>
Wed, 19 Aug 2009 15:21:18 +0000 (17:21 +0200)
committerAlexander Larsson <alexl@redhat.com>
Fri, 2 Oct 2009 19:02:48 +0000 (21:02 +0200)
This is set if a class or any of its parents have installed any
properties.

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

gobject/gobject.c

index 454d8c2..d7d5d56 100644 (file)
     ((G_DATALIST_GET_FLAGS (&(object)->qdata) & OBJECT_HAS_TOGGLE_REF_FLAG) != 0)
 #define OBJECT_FLOATING_FLAG 0x2
 
+#define CLASS_HAS_PROPS_FLAG 0x1
+#define CLASS_HAS_PROPS(class) \
+    ((class)->flags & CLASS_HAS_PROPS_FLAG)
 
 /* --- signals --- */
 enum {
@@ -409,6 +412,9 @@ g_object_class_install_property (GObjectClass *class,
 {
   g_return_if_fail (G_IS_OBJECT_CLASS (class));
   g_return_if_fail (G_IS_PARAM_SPEC (pspec));
+
+  class->flags |= CLASS_HAS_PROPS_FLAG;
+
   if (pspec->flags & G_PARAM_WRITABLE)
     g_return_if_fail (class->set_property != NULL);
   if (pspec->flags & G_PARAM_READABLE)