From c06f8db7d9c8eb44d6e410e3ad306b68507655e0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 27 Apr 2012 15:54:47 +0100 Subject: [PATCH 5/6] Move dbus-glib GType stuff to -dbus library --- telepathy-glib/Makefile.am | 4 ++-- telepathy-glib/codegen.am | 4 ++-- telepathy-glib/gtypes.c | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am index 78d8590..d9a9e5d 100644 --- a/telepathy-glib/Makefile.am +++ b/telepathy-glib/Makefile.am @@ -98,7 +98,6 @@ tpginclude_HEADERS = \ file-transfer-channel.h \ gnio-util.h \ group-mixin.h \ - gtypes.h \ handle.h \ handle-channels-context.h \ handle-repo.h \ @@ -147,6 +146,7 @@ tpgdbusinclude_HEADERS = \ cli-channel.h \ cli-connection.h \ cli-misc.h \ + gtypes.h \ $(NULL) BUILT_SOURCES = $(codegen_sources) @@ -186,6 +186,7 @@ libtelepathy_glib_dbus_internal_la_SOURCES = \ cli-channel.c \ cli-connection.c \ cli-misc.c \ + gtypes.c \ interfaces.c \ $(NULL) @@ -281,7 +282,6 @@ libtelepathy_glib_main_internal_la_SOURCES = \ file-transfer-channel.c \ gnio-util.c \ group-mixin.c \ - gtypes.c \ handle.c \ handle-channels-context-internal.h \ handle-channels-context.c \ diff --git a/telepathy-glib/codegen.am b/telepathy-glib/codegen.am index a437f57..9ccf927 100644 --- a/telepathy-glib/codegen.am +++ b/telepathy-glib/codegen.am @@ -38,6 +38,7 @@ codegen_sources = \ $(NULL) nodist_gendbusinclude_HEADERS = \ + _gen/gtypes.h \ _gen/telepathy-interfaces.h \ $(NULL) @@ -45,7 +46,6 @@ nodist_geninclude_HEADERS = \ _gen/error-str.h \ _gen/telepathy-enums.h \ _gen/genums.h \ - _gen/gtypes.h \ $(NULL) nodist_gendbusinclude_HEADERS += \ @@ -90,12 +90,12 @@ nodist_libtelepathy_glib_core_internal_la_SOURCES = \ $(NULL) nodist_libtelepathy_glib_dbus_internal_la_SOURCES = \ + _gen/gtypes-body.h \ _gen/interfaces-body.h \ $(NULL) nodist_libtelepathy_glib_main_internal_la_SOURCES = \ _gen/error-str.c \ - _gen/gtypes-body.h \ $(NULL) nodist_libtelepathy_glib_dbus_internal_la_SOURCES += \ diff --git a/telepathy-glib/gtypes.c b/telepathy-glib/gtypes.c index 7c26a4d..ca5e1b2 100644 --- a/telepathy-glib/gtypes.c +++ b/telepathy-glib/gtypes.c @@ -74,8 +74,10 @@ tp_type_dbus_array_of_o (void) GValue * tp_dbus_specialized_value_slice_new (GType type) { - GValue *value = tp_g_value_slice_new (type); + /* inlining tp_g_value_slice_new here to reduce inter-library calls */ + GValue *value = g_slice_new0 (GValue); + g_value_init (value, type); g_value_take_boxed (value, dbus_g_type_specialized_construct (type)); return value; } -- 1.7.10