diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2016-02-29 00:27:59 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2016-02-29 00:27:59 +0000 |
commit | 130190ed1ca0387b4bc22b15b0e1a910e961c667 (patch) | |
tree | d7b9661ae93f675383ffa2e617e96fd065cc5871 /json-glib/json-parser.h | |
parent | a1490d9b6a3a21774d68f085f805d5f7a68b305e (diff) | |
download | json-glib-130190ed1ca0387b4bc22b15b0e1a910e961c667.tar.gz |
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.
Diffstat (limited to 'json-glib/json-parser.h')
-rw-r--r-- | json-glib/json-parser.h | 4 |
1 files changed, 4 insertions, 0 deletions
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__ */ |