[libgdata] gdata: Add some g_autoptr() declarations for core classes



commit eb78a668687e74958331c39e6c1eba62d11d0f22
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Aug 8 21:09:03 2017 +0100

    gdata: Add some g_autoptr() declarations for core classes
    
    Coverage is by no means complete, but this adds the necessary public API
    to start using GDataService, GDataFeed and GDataEntry with g_autoptr().
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 gdata/gdata-entry.h   |    1 +
 gdata/gdata-feed.h    |    1 +
 gdata/gdata-service.h |    2 ++
 3 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gdata/gdata-entry.h b/gdata/gdata-entry.h
index d3fd748..5d878c9 100644
--- a/gdata/gdata-entry.h
+++ b/gdata/gdata-entry.h
@@ -77,6 +77,7 @@ typedef struct {
 } GDataEntryClass;
 
 GType gdata_entry_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataEntry, g_object_unref)
 
 GDataEntry *gdata_entry_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
 
diff --git a/gdata/gdata-feed.h b/gdata/gdata-feed.h
index 7bd510b..4da0e87 100644
--- a/gdata/gdata-feed.h
+++ b/gdata/gdata-feed.h
@@ -70,6 +70,7 @@ typedef struct {
 } GDataFeedClass;
 
 GType gdata_feed_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataFeed, g_object_unref)
 
 GList *gdata_feed_get_entries (GDataFeed *self) G_GNUC_PURE;
 GDataEntry *gdata_feed_look_up_entry (GDataFeed *self, const gchar *id) G_GNUC_PURE;
diff --git a/gdata/gdata-service.h b/gdata/gdata-service.h
index 4b34ba5..d0c656f 100644
--- a/gdata/gdata-service.h
+++ b/gdata/gdata-service.h
@@ -178,6 +178,8 @@ typedef struct {
        void (*_g_reserved7) (void);
 } GDataServiceClass;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataService, g_object_unref)
+
 GType gdata_service_get_type (void) G_GNUC_CONST;
 GQuark gdata_service_error_quark (void) G_GNUC_CONST;
 


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