diff options
author | Colin Walters <walters@verbum.org> | 2013-08-02 18:33:15 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-08-02 18:34:16 -0400 |
commit | a53219add5cbf9a9026422ea72b2e37dc3febe52 (patch) | |
tree | de1f827ce7f1b70f4a9d31eeb3435edaf3b57733 /gsystem-local-alloc.h | |
parent | c541759c92667fdf50975e4919b590b9091d2c65 (diff) | |
download | libgsystem-a53219add5cbf9a9026422ea72b2e37dc3febe52.tar.gz |
localalloc: Add gs_unref_array()
Requested by NetworkManager team.
Diffstat (limited to 'gsystem-local-alloc.h')
-rw-r--r-- | gsystem-local-alloc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gsystem-local-alloc.h b/gsystem-local-alloc.h index a44c4d4..8797cac 100644 --- a/gsystem-local-alloc.h +++ b/gsystem-local-alloc.h @@ -34,6 +34,7 @@ void gs_local_free (void *loc); void gs_local_obj_unref (void *loc); void gs_local_variant_unref (void *loc); void gs_local_variant_iter_free (void *loc); +void gs_local_array_unref (void *loc); void gs_local_ptrarray_unref (void *loc); void gs_local_hashtable_unref (void *loc); @@ -71,6 +72,16 @@ void gs_local_hashtable_unref (void *loc); #define gs_free_variant_iter __attribute__ ((cleanup(gs_local_variant_iter_free))) /** + * gs_unref_array: + * + * Call g_array_unref() on a variable location when it goes out of + * scope. Note that unlike g_array_unref(), the variable may be + * %NULL. + + */ +#define gs_unref_array __attribute__ ((cleanup(gs_local_array_unref))) + +/** * gs_unref_ptrarray: * * Call g_ptr_array_unref() on a variable location when it goes out of |