[at-spi2-core] Revert "Have atspi_accessible_get_relation_set return a GPtrArray"



commit 2a48cb5c384a3ce6626ecb3dc923b3e0b5059716
Author: Mike Gorse <mgorse novell com>
Date:   Tue Aug 23 11:52:07 2011 -0500

    Revert "Have atspi_accessible_get_relation_set return a GPtrArray"
    
    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 |    8 ++++----
 atspi/atspi-accessible.h |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c
index 5b7cdf6..29e4083 100644
--- a/atspi/atspi-accessible.c
+++ b/atspi/atspi-accessible.c
@@ -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);
diff --git a/atspi/atspi-accessible.h b/atspi/atspi-accessible.h
index 5dd1aab..d9deffe 100644
--- a/atspi/atspi-accessible.h
+++ b/atspi/atspi-accessible.h
@@ -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);
 



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