summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2021-01-11 14:13:24 +0100
committerBenjamin Berg <bberg@redhat.com>2021-01-11 15:55:06 +0100
commitb17c98fbb254829ec7a2481c02be15e1dadff4dd (patch)
treede452a95c83c2bb97786b947e813543593c6c27d
parentfbf3fb1fe48a7cf22f5d9427c2094aa9c3f52072 (diff)
downloadlibgweather-b17c98fbb254829ec7a2481c02be15e1dadff4dd.tar.gz
gweather: Add auto pointer types for location and timezone
-rw-r--r--libgweather/gweather-location.h2
-rw-r--r--libgweather/gweather-timezone.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/libgweather/gweather-location.h b/libgweather/gweather-location.h
index 701862d..badf222 100644
--- a/libgweather/gweather-location.h
+++ b/libgweather/gweather-location.h
@@ -58,6 +58,8 @@ GWeatherLocation *gweather_location_ref (GWeatherLocation *loc)
GWEATHER_EXTERN
void gweather_location_unref (GWeatherLocation *loc);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GWeatherLocation, gweather_location_unref);
+
GWEATHER_EXTERN
const char *gweather_location_get_name (GWeatherLocation *loc);
GWEATHER_EXTERN
diff --git a/libgweather/gweather-timezone.h b/libgweather/gweather-timezone.h
index 260a2fc..2368470 100644
--- a/libgweather/gweather-timezone.h
+++ b/libgweather/gweather-timezone.h
@@ -51,6 +51,8 @@ GWeatherTimezone *gweather_timezone_ref (GWeatherTimezone *zone);
GWEATHER_EXTERN
void gweather_timezone_unref (GWeatherTimezone *zone);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GWeatherTimezone, gweather_timezone_unref);
+
GWEATHER_EXTERN
GWeatherTimezone *gweather_timezone_get_utc (void);
GWEATHER_EXTERN