From ff60ff5a1906f64eea8ba1f59b26575ddc0ee74c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Sun, 4 Apr 2021 02:13:23 +0200 Subject: libtracker-sparql: Add autocleanups for TrackerEndpoint sub-classes 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 --- src/libtracker-sparql/tracker-endpoint-dbus.h | 2 ++ src/libtracker-sparql/tracker-endpoint-http.h | 2 ++ 2 files changed, 4 insertions(+) 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; -- cgit v1.2.1