diff options
Diffstat (limited to 'gsystem-local-alloc.c')
-rw-r--r-- | gsystem-local-alloc.c | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/gsystem-local-alloc.c b/gsystem-local-alloc.c index 3879b00..add3fcb 100644 --- a/gsystem-local-alloc.c +++ b/gsystem-local-alloc.c @@ -70,87 +70,3 @@ * </example> * */ - -void -gs_local_free (void *loc) -{ - void **location = loc; - if (location) - g_free (*location); -} - -#define _gs_local_free(type, function) do { \ - void **location = loc; \ - if (location) \ - { \ - type value = *location; \ - if (value) \ - function (value); \ - } \ - } while (0) - -void -gs_local_obj_unref (void *loc) -{ - _gs_local_free(GObject*, g_object_unref); -} - -void -gs_local_variant_unref (void *loc) -{ - _gs_local_free(GVariant*, g_variant_unref); -} - -void -gs_local_variant_iter_free (void *loc) -{ - _gs_local_free(GVariantIter*, g_variant_iter_free); -} - -void -gs_local_variant_builder_unref (void *loc) -{ - _gs_local_free(GVariantBuilder*, g_variant_builder_unref); -} - -void -gs_local_ptrarray_unref (void *loc) -{ - _gs_local_free(GPtrArray*, g_ptr_array_unref); -} - -void -gs_local_array_unref (void *loc) -{ - _gs_local_free(GArray*, g_array_unref); -} - -void -gs_local_hashtable_unref (void *loc) -{ - _gs_local_free(GHashTable*, g_hash_table_unref); -} - -void -gs_local_checksum_free (void *loc) -{ - _gs_local_free(GChecksum*, g_checksum_free); -} - -void -gs_local_bytes_unref (void *loc) -{ - _gs_local_free(GBytes*, g_bytes_unref); -} - -void -gs_local_strfreev (void *loc) -{ - _gs_local_free(char **, g_strfreev); -} - -void -gs_local_free_error (void *loc) -{ - _gs_local_free(GError*, g_error_free); -} |