summaryrefslogtreecommitdiff
path: root/json-glib/json-object.c
diff options
context:
space:
mode:
authorGarrett Regier <garrettregier@gmail.com>2016-10-20 19:44:09 -0700
committerGarrett Regier <garrettregier@gmail.com>2017-06-16 17:16:32 -0700
commitd78ad648942637fb9212d1d93670509d4c7f687b (patch)
treee1e2fe26f63d2d12446fee7aa291f1363e84ec6d /json-glib/json-object.c
parent7b3c405df41c0b6f6fe58fdb05c922614f08c4c4 (diff)
downloadjson-glib-d78ad648942637fb9212d1d93670509d4c7f687b.tar.gz
core: Avoid json_object_get_members()
Use JsonObject's private members_ordered GQueue instead. This avoids a g_list_copy(). https://bugzilla.gnome.org/show_bug.cgi?id=773504
Diffstat (limited to 'json-glib/json-object.c')
-rw-r--r--json-glib/json-object.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/json-glib/json-object.c b/json-glib/json-object.c
index b6c08a5..29b9401 100644
--- a/json-glib/json-object.c
+++ b/json-glib/json-object.c
@@ -487,6 +487,15 @@ json_object_get_members (JsonObject *object)
return g_list_copy (object->members_ordered.head);
}
+
+GQueue *
+json_object_get_members_internal (JsonObject *object)
+{
+ g_return_val_if_fail (object != NULL, NULL);
+
+ return &object->members_ordered;
+}
+
/**
* json_object_get_values:
* @object: a #JsonObject