Revert "Updated FSF's address"
[platform/upstream/atk.git] / atk / atkregistry.c
index a6598de..fb732c9 100644 (file)
@@ -28,7 +28,7 @@ static void              atk_registry_finalize       (GObject          *instance
 static void              atk_registry_class_init     (AtkRegistryClass *klass);
 static AtkRegistry*      atk_registry_new            (void);
 
-GObjectClass *parent_class;
+static gpointer parent_class = NULL;
 
 GType
 atk_registry_get_type (void)
@@ -110,7 +110,7 @@ atk_registry_finalize (GObject *object)
   g_hash_table_destroy (registry->factory_type_registry);
   g_hash_table_destroy (registry->factory_singleton_cache);
 
-  parent_class->finalize (object);
+  G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
 /**
@@ -137,18 +137,18 @@ atk_registry_set_factory_type (AtkRegistry *registry,
   g_return_if_fail (ATK_IS_REGISTRY (registry));
 
   value = g_hash_table_lookup (registry->factory_type_registry, 
-                                  GUINT_TO_POINTER (type));
-  old_type = GPOINTER_TO_UINT (value);
+                                  (gpointer) type);
+  old_type = (GType) value;
   if (old_type && old_type != factory_type)
     {
       g_hash_table_remove (registry->factory_type_registry, 
-                           GUINT_TO_POINTER (type));
+                           (gpointer) type);
       /*
        * If the old factory was created, notify it that it has
        * been replaced, then free it.
        */
       old_factory = g_hash_table_lookup (registry->factory_singleton_cache, 
-                                         GUINT_TO_POINTER (old_type));
+                                         (gpointer) old_type);
       if (old_factory)
         {
           atk_object_factory_invalidate (old_factory);
@@ -156,8 +156,8 @@ atk_registry_set_factory_type (AtkRegistry *registry,
         }
     }
   g_hash_table_insert (registry->factory_type_registry, 
-                       GUINT_TO_POINTER (type)
-                       GUINT_TO_POINTER (factory_type));
+                       (gpointer) type
+                       (gpointer) factory_type);
 }
 
 /**
@@ -186,7 +186,7 @@ atk_registry_get_factory_type (AtkRegistry *registry,
   do {
     value =
         g_hash_table_lookup (registry->factory_type_registry, 
-                             GUINT_TO_POINTER (type));
+                             (gpointer) type);
     type = g_type_parent (type);
     if (type == G_TYPE_INVALID)
       {
@@ -194,7 +194,7 @@ atk_registry_get_factory_type (AtkRegistry *registry,
       }
   } while (value == NULL);
 
-  factory_type = GPOINTER_TO_UINT (value);
+  factory_type = (GType) value;
   return factory_type;
 }
 
@@ -206,8 +206,8 @@ atk_registry_get_factory_type (AtkRegistry *registry,
  * Gets an #AtkObjectFactory appropriate for creating #AtkObjects
  * appropriate for @type.
  *
- * Returns: an #AtkObjectFactory appropriate for creating #AtkObjects
- * appropriate for @type.
+ * Returns: (transfer none): an #AtkObjectFactory appropriate for creating
+ * #AtkObjects appropriate for @type.
  **/
 AtkObjectFactory*
 atk_registry_get_factory (AtkRegistry *registry,
@@ -232,14 +232,14 @@ atk_registry_get_factory (AtkRegistry *registry,
   /* ask second hashtable for instance of factory type */
   factory_pointer =
         g_hash_table_lookup (registry->factory_singleton_cache, 
-        GUINT_TO_POINTER (factory_type));
+        (gpointer) factory_type);
 
   /* if there isn't one already, create one and save it */
   if (factory_pointer == NULL)
     {
       factory_pointer = g_type_create_instance (factory_type);
       g_hash_table_insert (registry->factory_singleton_cache,
-                           GUINT_TO_POINTER (factory_type),
+                           (gpointer) factory_type,
                            factory_pointer);
     }
 
@@ -247,7 +247,7 @@ atk_registry_get_factory (AtkRegistry *registry,
 }
 
 /**
- *atk_get_default_registry:
+ * atk_get_default_registry:
  *
  * Gets a default implementation of the #AtkObjectFactory/type
  * registry.
@@ -257,8 +257,8 @@ atk_registry_get_factory (AtkRegistry *registry,
  * to associate an #AtkObjectFactory subclass with the GType of objects
  * for whom accessibility information will be provided.
  *
- * Returns: a default implementation of the #AtkObjectFactory/type
- * registry
+ * Returns: (transfer full): a default implementation of the
+ * #AtkObjectFactory/type registry
  **/
 AtkRegistry*
 atk_get_default_registry (void)