summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2017-10-19 12:08:21 +1300
committerEmmanuele Bassi <ebassi@gnome.org>2018-03-13 11:14:57 +0000
commit3c0b984410730b6c8f139c2c0f6132d51f38228f (patch)
tree08ab1e6d38fe9728a500229dc7f228850824132e
parentbb0f4769ebaa48b48eda1fb5e12822fa0a7df222 (diff)
downloadjson-glib-3c0b984410730b6c8f139c2c0f6132d51f38228f.tar.gz
node: Use json_node_unref for the JsonNode autoptr cleanup
json_node_unref was added after the autoptr macros were written. This fixes an assertion failure if using autoptr and json_node_ref. (cherry picked from commit 0df2466103ff706e980e82cd560232fdd2ba1baa) Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
-rw-r--r--json-glib/json-types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/json-glib/json-types.h b/json-glib/json-types.h
index d845f94..cd18c66 100644
--- a/json-glib/json-types.h
+++ b/json-glib/json-types.h
@@ -517,7 +517,7 @@ gboolean json_array_equal (gconstpointer a,
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonArray, json_array_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonObject, json_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonNode, json_node_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonNode, json_node_unref)
#endif
G_END_DECLS