summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-09-13 11:49:17 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-09-13 11:49:19 +0100
commit627d5da2a055da063e01644aa88155df02c29ede (patch)
tree1f596e0f792b7bf91969e59b72230c26a60e5555
parentdd859a06529317727c586a4b235a3ef1ac466872 (diff)
parent7445c3e6c1028c4ca1610d25d9736fbc7e9fead3 (diff)
Merge branch 'g-i-fixes'
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac16
-rw-r--r--telepathy-glib/account-manager.c6
-rw-r--r--telepathy-glib/dbus-daemon.c4
-rw-r--r--telepathy-glib/introspection.am15
-rw-r--r--telepathy-glib/intset.c6
6 files changed, 37 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index d536cb5b5..ab23ce650 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,9 +7,11 @@ SUBDIRS = \
telepathy-glib \
$(NULL)
+if HAVE_INTROSPECTION
if HAVE_VALA
SUBDIRS += vala
endif
+endif
SUBDIRS += \
extensions \
diff --git a/configure.ac b/configure.ac
index 39100ccd8..d73b746b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,9 +64,19 @@ AM_PROG_MKDIR_P
# pkg-config 0.21 adds CFLAGS from Requires.private, which we need
PKG_PROG_PKG_CONFIG([0.21])
-GOBJECT_INTROSPECTION_CHECK([0.6.14])
GTK_DOC_CHECK([1.15])
+GOBJECT_INTROSPECTION_CHECK([0.6.14])
+# Check if we have a new gobject-introspection, with different command-line
+# arguments. Eventually this will go away and we can only depend on the new
+# version
+AC_MSG_CHECKING([what arguments g-ir-scanner requires])
+PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 0.9.5],
+ g_ir_scanner_args=new,
+ g_ir_scanner_args=old)
+AC_MSG_RESULT([$g_ir_scanner_args])
+AM_CONDITIONAL(G_IR_SCANNER_NEW_ARGS, test "x$g_ir_scanner_args" = "xnew")
+
LT_CURRENT=tp_glib_lt_current
LT_REVISION=tp_glib_lt_revision
LT_AGE=tp_glib_lt_age
@@ -203,6 +213,10 @@ AC_ARG_ENABLE(vala-bindings,
enable_vala_bindings=no )
if test x$enable_vala_bindings = xyes; then
+ if test "x$INTROSPECTION_SCANNER" = x; then
+ AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
+ fi
+
m4_ifdef([AM_PROG_VALAC], [AM_PROG_VALAC(0.9.3)],
[AC_MSG_ERROR([Automake >= 1.11 required for Vala bindings])])
have_vala=yes
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index e5d3caadc..6c466dd5f 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -700,9 +700,9 @@ static gpointer starter_account_manager_proxy = NULL;
* reference exists. Note that the returned #TpAccountManager is not guaranteed
* to be ready on return.
*
- * Returns: an account manager proxy on the starter or session bus, or %NULL
- * if it wasn't possible to get a dbus daemon proxy for the
- * appropriate bus
+ * Returns: (transfer full): an account manager proxy on the starter or session
+ * bus, or %NULL if it wasn't possible to get a dbus daemon proxy for
+ * the appropriate bus
*
* Since: 0.9.0
*/
diff --git a/telepathy-glib/dbus-daemon.c b/telepathy-glib/dbus-daemon.c
index 5c736cc29..b4dfcdbe2 100644
--- a/telepathy-glib/dbus-daemon.c
+++ b/telepathy-glib/dbus-daemon.c
@@ -94,8 +94,8 @@ static gpointer starter_bus_daemon = NULL;
* be returned by this function repeatedly, as long as at least one reference
* exists.
*
- * Returns: a reference to a proxy for signals and method calls on the bus
- * daemon, or %NULL
+ * Returns: (transfer full): a reference to a proxy for signals and method
+ * calls on the bus daemon, or %NULL
*
* Since: 0.7.26
*/
diff --git a/telepathy-glib/introspection.am b/telepathy-glib/introspection.am
index 72a984192..78735d79a 100644
--- a/telepathy-glib/introspection.am
+++ b/telepathy-glib/introspection.am
@@ -10,7 +10,7 @@ INTROSPECTION_FILES = \
$(srcdir)/account-channel-request.c $(srcdir)/account-channel-request.h \
$(srcdir)/account-manager.c $(srcdir)/account-manager.h \
$(srcdir)/connection.c $(srcdir)/connection.h \
- $(srcdir)/connection-handles.c \
+ $(srcdir)/connection-handles.c $(srcdir)/connection-contact-info.c \
$(srcdir)/protocol.c $(srcdir)/protocol.h \
$(srcdir)/connection-manager.c $(srcdir)/connection-manager.h \
$(srcdir)/channel.c $(srcdir)/channel.h \
@@ -41,12 +41,20 @@ INTROSPECTION_FILES = \
$(srcdir)/handle-repo.c $(srcdir)/handle-repo.h $(srcdir)/handle-set.c \
$(srcdir)/errors.c $(srcdir)/errors.h \
_gen/telepathy-enums.h \
- _gen/telepathy-interfaces.h
+ $(NULL)
_gen/proxy-introspectable.h: proxy.h introspection.am
@$(mkdir_p) _gen
$(AM_V_GEN)sed -e 's/gpointer self/TpProxy *self/' < $< > $@
+if G_IR_SCANNER_NEW_ARGS
+gi_identifier_prefix_arg = --identifier-prefix
+gi_warn_all_arg = --warn-all
+else
+gi_identifier_prefix_arg = --strip-prefix
+gi_warn_all_arg =
+endif
+
TelepathyGLib-0.12.gir: $(INTROSPECTION_SCANNER) \
libtelepathy-glib.la \
$(srcdir)/kludge-616375.xsl \
@@ -54,7 +62,7 @@ TelepathyGLib-0.12.gir: $(INTROSPECTION_SCANNER) \
$(AM_V_GEN)$(INTROSPECTION_SCANNER) -v \
--namespace TelepathyGLib \
--nsversion=0.12 \
- --strip-prefix=tp \
+ $(gi_identifier_prefix_arg)=Tp \
-I$(top_builddir) \
-I$(top_srcdir) \
--include=GLib-2.0 \
@@ -63,6 +71,7 @@ TelepathyGLib-0.12.gir: $(INTROSPECTION_SCANNER) \
--library=libtelepathy-glib.la \
--pkg gio-2.0 \
--pkg dbus-glib-1 \
+ $(gi_warn_all_arg) \
--output _gen/$@.tmp \
$(INTROSPECTION_FILES)
@xsltproc $(srcdir)/kludge-616375.xsl _gen/$@.tmp > $@
diff --git a/telepathy-glib/intset.c b/telepathy-glib/intset.c
index baa995e86..3b6ce33bc 100644
--- a/telepathy-glib/intset.c
+++ b/telepathy-glib/intset.c
@@ -355,7 +355,7 @@ tp_intset_is_member (const TpIntSet *set, guint element)
/**
* tp_intset_foreach:
* @set: set
- * @func: @TpIntFunc to use to iterate the set
+ * @func: (scope call): @TpIntFunc to use to iterate the set
* @userdata: user data to pass to each call of @func
*
* Call @func(element, @userdata) for each element of @set, in order.
@@ -404,8 +404,8 @@ addint (guint i, gpointer data)
*
* <!--Returns: says it all-->
*
- * Returns: (element-type uint): a GArray of guint (which must be freed by the caller) containing
- * the same integers as @set.
+ * Returns: (element-type uint) (transfer full): a GArray of guint (which must
+ * be freed by the caller) containing the same integers as @set.
*/
GArray *
tp_intset_to_array (const TpIntSet *set)