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-parser.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'json-glib/json-parser.h') diff --git a/json-glib/json-parser.h b/json-glib/json-parser.h index 8666548..a65558e 100644 --- a/json-glib/json-parser.h +++ b/json-glib/json-parser.h @@ -183,6 +183,10 @@ JSON_AVAILABLE_IN_1_0 gboolean json_parser_has_assignment (JsonParser *parser, gchar **variable_name); +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonParser, g_object_unref) +#endif + G_END_DECLS #endif /* __JSON_PARSER_H__ */ -- cgit v1.2.1