summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2021-04-04 02:13:23 +0200
committerDebarshi Ray <debarshir@gnome.org>2021-04-04 02:14:24 +0200
commitff60ff5a1906f64eea8ba1f59b26575ddc0ee74c (patch)
treed46d144eaf100661000b084066e192f76e77b63d
parentaa5d1d33ba2aee01344aace0674b8fa6c1647c29 (diff)
downloadtracker-wip/rishi/endpoint-g_auto.tar.gz
libtracker-sparql: Add autocleanups for TrackerEndpoint sub-classeswip/rishi/endpoint-g_auto
TrackerEndpointDBus and TrackerEndpointHttp are derivable classes within the tracker.git codebase, but final outside it. This prevents them from using the G_DECLARE_DERIVABLE_TYPE macro. Therefore the cleanup functions for them need to be separately defined. https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/396
-rw-r--r--src/libtracker-sparql/tracker-endpoint-dbus.h2
-rw-r--r--src/libtracker-sparql/tracker-endpoint-http.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libtracker-sparql/tracker-endpoint-dbus.h b/src/libtracker-sparql/tracker-endpoint-dbus.h
index bf76251a0..36673ab41 100644
--- a/src/libtracker-sparql/tracker-endpoint-dbus.h
+++ b/src/libtracker-sparql/tracker-endpoint-dbus.h
@@ -44,6 +44,8 @@
*/
typedef struct _TrackerEndpointDBus TrackerEndpointDBus;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (TrackerEndpointDBus, g_object_unref);
+
TRACKER_AVAILABLE_IN_ALL
GType tracker_endpoint_dbus_get_type (void) G_GNUC_CONST;
diff --git a/src/libtracker-sparql/tracker-endpoint-http.h b/src/libtracker-sparql/tracker-endpoint-http.h
index 40ef38591..e808698b8 100644
--- a/src/libtracker-sparql/tracker-endpoint-http.h
+++ b/src/libtracker-sparql/tracker-endpoint-http.h
@@ -44,6 +44,8 @@
*/
typedef struct _TrackerEndpointHttp TrackerEndpointHttp;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (TrackerEndpointHttp, g_object_unref);
+
TRACKER_AVAILABLE_IN_3_1
GType tracker_endpoint_http_get_type (void) G_GNUC_CONST;