[next] telepathy-glib: Move dbus-glib GType stuff to -dbus library
Simon McVittie
smcv at kemper.freedesktop.org
Mon Apr 30 11:04:03 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 620bc9380a2c5ab14e8198248b91c24db1ffb7ff
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=620bc9380a2c5ab14e8198248b91c24db1ffb7ff
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Fri Apr 27 15:54:47 2012 +0100
Move dbus-glib GType stuff to -dbus library
Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46835
---
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 b5a4e8b..8b320fa 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 \
@@ -149,6 +148,7 @@ tpgdbusinclude_HEADERS = \
cli-channel.h \
cli-connection.h \
cli-misc.h \
+ gtypes.h \
$(NULL)
BUILT_SOURCES = $(codegen_sources)
@@ -188,6 +188,7 @@ libtelepathy_glib_dbus_internal_la_SOURCES = \
cli-channel.c \
cli-connection.c \
cli-misc.c \
+ gtypes.c \
interfaces.c \
$(NULL)
@@ -283,7 +284,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;
}
More information about the telepathy-commits
mailing list