[json-glib] Add autoptr clean up definition for JsonSerializable



commit c7b7b18e39522d8718e1d5118fe34d9b1c9707a0
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Mar 11 15:45:26 2017 +0000

    Add autoptr clean up definition for JsonSerializable
    
    This way developers can use G_DECLARE_INTERFACE with Serializable as a
    pre-condition.

 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__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]