[libgweather/benzea/wip-variant-backend: 1/11] gweather: Add auto pointer types for location and timezone




commit 8c4ae3a94034642747700e6292b58219dc7186eb
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Jan 11 14:13:24 2021 +0100

    gweather: Add auto pointer types for location and timezone

 libgweather/gweather-location.h | 2 ++
 libgweather/gweather-timezone.h | 2 ++
 2 files changed, 4 insertions(+)
---
diff --git a/libgweather/gweather-location.h b/libgweather/gweather-location.h
index 701862d8..badf2226 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 260a2fca..2368470f 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


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