From 130190ed1ca0387b4bc22b15b0e1a910e961c667 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 29 Feb 2016 00:27:59 +0000 Subject: Add autoptr macros GLib can take advantage of the "cleanup" attribute by using a bunch of macro magic. This has been slowly been used across various libraries in the G* stack, so JSON-GLib should provide symbols for the automatic memory management of its types. --- json-glib/json-path.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'json-glib/json-path.h') diff --git a/json-glib/json-path.h b/json-glib/json-path.h index b8ffb91..3c3ddf0 100644 --- a/json-glib/json-path.h +++ b/json-glib/json-path.h @@ -97,6 +97,10 @@ JsonNode * json_path_query (const char *expression, JsonNode *root, GError **error); +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonPath, g_object_unref) +#endif + G_END_DECLS #endif /* __JSON_PATH_H__ */ -- cgit v1.2.1