diff options
author | Robert McQueen <robot101@debian.org> | 2006-01-27 15:40:36 +0000 |
---|---|---|
committer | Robert McQueen <robot101@debian.org> | 2006-01-27 15:40:36 +0000 |
commit | 8e00b10d134e4fb844cdc961e5c3230edf194b57 (patch) | |
tree | 916ef4ae22231cf4cd6d320fc23a97137ac2a2d6 /glib/dbus-gtype-specialized.h | |
parent | ce13b5dff7208beade01ac06235c263872201c80 (diff) |
2006-01-27 Robert McQueen <robot101@debian.org>
* glib/dbus-gtype-specialized.[ch], glib/dbus-gvalue-utils.c: Patch
by me and Rob Taylor to add a simple_free function to D-Bus map
and collection types, which allows those types which can be freed
with a GDestroyNotify (such as GHashTables and GArrays, but not
GPtrArrays) to be stored as the values in hashtables.
* test/glib/test-dbus-glib.c, test/glib/test-service-glib.{c,xml}:
Patch by Rob Taylor to add nested dicts to the glib tests to check
the above code works, and appears not to leak when called repeatedly.
Diffstat (limited to 'glib/dbus-gtype-specialized.h')
-rw-r--r-- | glib/dbus-gtype-specialized.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/glib/dbus-gtype-specialized.h b/glib/dbus-gtype-specialized.h index e95af3e5..505c95bc 100644 --- a/glib/dbus-gtype-specialized.h +++ b/glib/dbus-gtype-specialized.h @@ -89,7 +89,7 @@ typedef struct { DBusGTypeSpecializedConstructor constructor; DBusGTypeSpecializedFreeFunc free_func; DBusGTypeSpecializedCopyFunc copy_func; - gpointer padding1; + GDestroyNotify simple_free_func; /* for type-independent freeing if possible */ gpointer padding2; gpointer padding3; } DBusGTypeSpecializedVtable; @@ -125,6 +125,8 @@ void dbus_g_type_register_collection (const char void dbus_g_type_register_map (const char *name, const DBusGTypeSpecializedMapVtable *vtable, guint flags); +const DBusGTypeSpecializedMapVtable* dbus_g_type_map_peek_vtable (GType map_type); +const DBusGTypeSpecializedCollectionVtable* dbus_g_type_collection_peek_vtable (GType collection_type); G_END_DECLS |