[glib/wip/gproperty-2] gproperties: Rename properties static variable to avoid collisions



commit a897b188a75cbfee52e9b2fd1341a0eece9e22fc
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Jun 18 11:33:45 2013 +0200

    gproperties: Rename properties static variable to avoid collisions
    
    We add a _gtype_ to the name as it was conficting with existing
    names in gtk+ and glade (at least).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=648526

 gobject/gproperty.h |   16 ++++++++--------
 gobject/gtype.h     |    4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gobject/gproperty.h b/gobject/gproperty.h
index 7a32ec9..21fb573 100644
--- a/gobject/gproperty.h
+++ b/gobject/gproperty.h
@@ -514,11 +514,11 @@ void            g_property_init_default        (GProperty *property,
 \
     _C_ \
 \
-    t_n##_properties_len = g_define_properties->len; \
-    t_n##_properties = (GParamSpec **) g_ptr_array_free (g_define_properties, FALSE); \
+    t_n##_gtype_properties_len = g_define_properties->len; \
+    t_n##_gtype_properties = (GParamSpec **) g_ptr_array_free (g_define_properties, FALSE); \
     g_object_class_install_properties (G_OBJECT_CLASS (g_class), \
-                                       t_n##_properties_len, \
-                                       t_n##_properties); \
+                                       t_n##_gtype_properties_len, \
+                                       t_n##_gtype_properties); \
   }
 
 #define _G_DEFINE_DIRECT_PROPERTY_EXTENDED_BEGIN(T_N, c_type, name, flags) \
@@ -707,9 +707,9 @@ void            g_property_init_default        (GProperty *property,
     const char *pname = g_property_canonicalize_name (#f_n); \
     int i; \
 \
-    for (i = 1; i < t_n##_properties_len; i++) \
+    for (i = 1; i < t_n##_gtype_properties_len; i++) \
       { \
-        GParamSpec *pspec = t_n##_properties[i]; \
+        GParamSpec *pspec = t_n##_gtype_properties[i]; \
         if (pspec != NULL && pspec->name == pname) \
           { \
             g_property = (GProperty *) pspec; \
@@ -750,9 +750,9 @@ void            g_property_init_default        (GProperty *property,
     const char *pname = g_property_canonicalize_name (#f_n); \
     int i; \
 \
-    for (i = 1; i < t_n##_properties_len; i++) \
+    for (i = 1; i < t_n##_gtype_properties_len; i++) \
       { \
-        GParamSpec *pspec = t_n##_properties[i]; \
+        GParamSpec *pspec = t_n##_gtype_properties[i]; \
         if (pspec != NULL && pspec->name == pname) \
           { \
             g_property = (GProperty *) pspec; \
diff --git a/gobject/gtype.h b/gobject/gtype.h
index ad44888..668e461 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -1589,8 +1589,8 @@ static void         type_name##_init              (TypeName        *self); \
 static void         type_name##_class_init        (TypeName##Class *klass); \
 static gpointer     type_name##_parent_class = NULL; \
 static gint         type_name##_private_offset; \
-static GParamSpec **type_name##_properties G_GNUC_UNUSED; \
-static guint        type_name##_properties_len G_GNUC_UNUSED; \
+static GParamSpec **type_name##_gtype_properties G_GNUC_UNUSED; \
+static guint        type_name##_gtype_properties_len G_GNUC_UNUSED; \
 static void         type_name##_class_intern_init (gpointer klass) \
 { \
   type_name##_parent_class = g_type_class_peek_parent (klass); \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]