diff options
author | Benjamin Berg <bberg@redhat.com> | 2021-01-11 14:13:24 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-01-11 20:31:52 +0100 |
commit | 996dbb5061b018ebbd88180d2dc373ff5c887789 (patch) | |
tree | 5392c85ed3b3ecc7c988df6d24ccf1c4ed08e98f | |
parent | 21181fa89dd209c5ecf9f9357250e9abe1944b54 (diff) | |
download | libgweather-996dbb5061b018ebbd88180d2dc373ff5c887789.tar.gz |
gweather: Add auto pointer types for location and timezone
-rw-r--r-- | libgweather/gweather-location.h | 2 | ||||
-rw-r--r-- | libgweather/gweather-timezone.h | 2 |
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 |