diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-11 15:45:26 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-11 15:46:24 +0000 |
commit | c7b7b18e39522d8718e1d5118fe34d9b1c9707a0 (patch) | |
tree | 42ecf1cf26ffbcc0f72760347b85dae5a5a68e2f /json-glib/json-gobject.h | |
parent | 011c1e424b7cdee2bda2ef0b77be538932dd64a7 (diff) | |
download | json-glib-c7b7b18e39522d8718e1d5118fe34d9b1c9707a0.tar.gz |
Add autoptr clean up definition for JsonSerializable
This way developers can use G_DECLARE_INTERFACE with Serializable as a
pre-condition.
Diffstat (limited to 'json-glib/json-gobject.h')
-rw-r--r-- | json-glib/json-gobject.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/json-glib/json-gobject.h b/json-glib/json-gobject.h index 17aa2db..47ac125 100644 --- a/json-glib/json-gobject.h +++ b/json-glib/json-gobject.h @@ -194,6 +194,10 @@ JSON_DEPRECATED_IN_1_0_FOR(json_gobject_to_data) gchar * json_serialize_gobject (GObject *gobject, gsize *length) G_GNUC_MALLOC; +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonSerializable, g_object_unref) +#endif + G_END_DECLS #endif /* __JSON_GOBJECT_H__ */ |