Revert "Have atspi_accessible_get_relation_set return a GPtrArray"
authorMike Gorse <mgorse@novell.com>
Tue, 23 Aug 2011 16:52:07 +0000 (11:52 -0500)
committerMike Gorse <mgorse@novell.com>
Tue, 23 Aug 2011 16:52:07 +0000 (11:52 -0500)
This change is no longer needed for the newest pygobject and crashes
with pygobject 2.28.x (see BGO#656004), so reverting, although may need
to reconsider this issue in general pending the resolution of
BGO#657120.

This reverts commit 229a6039d0c7a91cee71037741173d9a94a39e77.

atspi/atspi-accessible.c
atspi/atspi-accessible.h

index 5b7cdf6..29e4083 100644 (file)
@@ -519,10 +519,10 @@ typedef struct
  * Get the set of #AtspiRelation objects which describe this #AtspiAccessible object's
  *       relationships with other #AtspiAccessible objects.
  *
- * Returns: (element-type AtspiRelation*) (transfer full): an array of
+ * Returns: (element-type AtspiAccessible*) (transfer full): an array of
  *          #AtspiAccessibleRelation pointers. or NULL on exception
  **/
-GPtrArray *
+GArray *
 atspi_accessible_get_relation_set (AtspiAccessible *obj, GError **error)
 {
   DBusMessage *reply;
@@ -536,14 +536,14 @@ atspi_accessible_get_relation_set (AtspiAccessible *obj, GError **error)
     return NULL;
   _ATSPI_DBUS_CHECK_SIG (reply, "a(ua(so))", error, NULL);
 
-  ret = g_ptr_array_new ();
+  ret = g_array_new (TRUE, TRUE, sizeof (AtspiRelation *));
   dbus_message_iter_init (reply, &iter);
   dbus_message_iter_recurse (&iter, &iter_array);
   while (dbus_message_iter_get_arg_type (&iter_array) != DBUS_TYPE_INVALID)
   {
     AtspiRelation *relation;
     relation = _atspi_relation_new_from_iter (&iter_array);
-    g_ptr_array_add (ret, relation);
+    ret = g_array_append_val (ret, relation);
     dbus_message_iter_next (&iter_array);
   }
   dbus_message_unref (reply);
index 5dd1aab..d9deffe 100644 (file)
@@ -80,7 +80,7 @@ AtspiAccessible * atspi_accessible_get_child_at_index (AtspiAccessible *obj, gin
 
 gint atspi_accessible_get_index_in_parent (AtspiAccessible *obj, GError **error);
 
-GPtrArray * atspi_accessible_get_relation_set (AtspiAccessible *obj, GError **error);
+GArray * atspi_accessible_get_relation_set (AtspiAccessible *obj, GError **error);
 
 AtspiRole atspi_accessible_get_role (AtspiAccessible *obj, GError **error);