#define PACKAGE_NAME "gobject-introspection"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "gojbect-introspection 1.45.4"
+#define PACKAGE_STRING "gojbect-introspection 1.46.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gobject-introspection"
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.45.4"
+#define PACKAGE_VERSION "1.46.0"
/* Define to the platform's shared library suffix */
#define SHLIB_SUFFIX ".dll"
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "1.45.4"
+#define VERSION "1.46.0"
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gobject-introspection 1.45.4.
+# Generated by GNU Autoconf 2.69 for gobject-introspection 1.46.0.
#
# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection>.
#
# Identity of this package.
PACKAGE_NAME='gobject-introspection'
PACKAGE_TARNAME='gobject-introspection'
-PACKAGE_VERSION='1.45.4'
-PACKAGE_STRING='gobject-introspection 1.45.4'
+PACKAGE_VERSION='1.46.0'
+PACKAGE_STRING='gobject-introspection 1.46.0'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection'
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures gobject-introspection 1.45.4 to adapt to many kinds of systems.
+\`configure' configures gobject-introspection 1.46.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gobject-introspection 1.45.4:";;
+ short | recursive ) echo "Configuration of gobject-introspection 1.46.0:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gobject-introspection configure 1.45.4
+gobject-introspection configure 1.46.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by gobject-introspection $as_me 1.45.4, which was
+It was created by gobject-introspection $as_me 1.46.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='gobject-introspection'
- VERSION='1.45.4'
+ VERSION='1.46.0'
cat >>confdefs.h <<_ACEOF
# Used in docs/reference/version.xml
-GI_VERSION=1.45.4
+GI_VERSION=1.46.0
# Check for Win32
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by gobject-introspection $as_me 1.45.4, which was
+This file was extended by gobject-introspection $as_me 1.46.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-gobject-introspection config.status 1.45.4
+gobject-introspection config.status 1.46.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
dnl the gi version number
m4_define(gi_major_version, 1)
-m4_define(gi_minor_version, 45)
-m4_define(gi_micro_version, 4)
+m4_define(gi_minor_version, 46)
+m4_define(gi_micro_version, 0)
m4_define(gi_version, gi_major_version.gi_minor_version.gi_micro_version)
AC_PREREQ([2.63])
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GObject Introspection Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">
- This document is for GObject Introspection version 1.45.4
+ This document is for GObject Introspection version 1.46.0
.
The latest version of this documentation can be found on-line at
<a class="ulink" href="http://developer.gnome.org/gi/unstable/" target="_top">http://developer.gnome.org/gi/unstable/</a>.
* the names must begin with a lowercase character, must not end
* with a '-', and must not contain consecutive dashes.
*
- * GSettings supports change notification. The primary mechanism to
- * watch for changes is to connect to the "changed" signal. You can
- * optionally watch for changes on only a single key by using a signal
- * detail. Signals are only guaranteed to be emitted for a given key
- * after you have read the value of that key while a signal handler was
- * connected for that key. Signals may or may not be emitted in the
- * case that the key "changed" to the value that you had previously
- * read. Signals may be reported in additional cases as well and the
- * "changed" signal should really be treated as "may have changed".
- *
* Similar to GConf, the default values in GSettings schemas can be
* localized, but the localized values are stored in gettext catalogs
* and looked up with the domain that is specified in the
* message. Similary, if a filter consumes an outgoing message, the
* message will not be sent to the other peer.
*
+ * If @user_data_free_func is non-%NULL, it will be called (in the
+ * thread-default main context of the thread you are calling this
+ * method from) at some point after @user_data is no longer
+ * needed. (It is not guaranteed to be called synchronously when the
+ * filter is removed, and may be called after @connection has been
+ * destroyed.)
+ *
* Returns: a filter identifier that can be used with
* g_dbus_connection_remove_filter()
* Since: 2.26
*
* Removes a filter.
*
+ * Note that since filters run in a different thread, there is a race
+ * condition where it is possible that the filter will be running even
+ * after calling g_dbus_connection_remove_filter(), so you cannot just
+ * free data that the filter might be using. Instead, you should pass
+ * a #GDestroyNotify to g_dbus_connection_add_filter(), which will be
+ * called when it is guaranteed that the data is no longer needed.
+ *
* Since: 2.26
*/
* interpreted as part of a namespace or path. The first argument
* of a signal is matched against that part as specified by D-Bus.
*
+ * If @user_data_free_func is non-%NULL, it will be called (in the
+ * thread-default main context of the thread you are calling this
+ * method from) at some point after @user_data is no longer
+ * needed. (It is not guaranteed to be called synchronously when the
+ * signal is unsubscribed from, and may be called after @connection
+ * has been destroyed.)
+ *
* Returns: a subscription identifier that can be used with g_dbus_connection_signal_unsubscribe()
* Since: 2.26
*/
* g_file_get_path:
* @file: input #GFile
*
- * Gets the local pathname for #GFile, if one exists.
+ * Gets the local pathname for #GFile, if one exists. If non-%NULL, this is
+ * guaranteed to be an absolute, canonical path. It might contain symlinks.
*
* This call does no blocking I/O.
*
*
* If @parent is %NULL then this function returns %TRUE if @file has any
* parent at all. If @parent is non-%NULL then %TRUE is only returned
- * if @file is a child of @parent.
+ * if @file is an immediate child of @parent.
*
- * Returns: %TRUE if @file is a child of @parent (or any parent in the
- * case that @parent is %NULL).
+ * Returns: %TRUE if @file is an immediate child of @parent (or any parent in
+ * the case that @parent is %NULL).
* Since: 2.24
*/
/**
+ * g_list_store_sort:
+ * @store: a #GListStore
+ * @compare_func: (scope call): pairwise comparison function for sorting
+ * @user_data: (closure): user data for @compare_func
+ *
+ * Sort the items in @store according to @compare_func.
+ *
+ * Since: 2.46
+ */
+
+
+/**
* g_list_store_splice:
* @store: a #GListStore
* @position: the position at which to make the change
* The first, and preferred, option is to store the source ID returned by
* functions such as g_timeout_add() or g_source_attach(), and explicitly
* remove that source from the main context using g_source_remove() when the
- * owning object is finalised. This ensures that the callback can only be
+ * owning object is finalized. This ensures that the callback can only be
* invoked while the object is still alive.
*
* The second option is to hold a strong reference to the object in the
* "assertions", which consists of running the test_assertions function.
*
* In addition to the traditional g_assert(), the test framework provides
- * an extended set of assertions for string and numerical comparisons:
- * g_assert_cmpfloat(), g_assert_cmpint(), g_assert_cmpuint(),
- * g_assert_cmphex(), g_assert_cmpstr(). The advantage of these variants
- * over plain g_assert() is that the assertion messages can be more
- * elaborate, and include the values of the compared entities.
+ * an extended set of assertions for comparisons: g_assert_cmpfloat(),
+ * g_assert_cmpint(), g_assert_cmpuint(), g_assert_cmphex(),
+ * g_assert_cmpstr(), and g_assert_cmpmem(). The advantage of these
+ * variants over plain g_assert() is that the assertion messages can be
+ * more elaborate, and include the values of the compared entities.
*
* GLib ships with two utilities called [gtester][gtester] and
* [gtester-report][gtester-report] to facilitate running tests and producing
/**
+ * g_assert_cmpmem:
+ * @m1: pointer to a buffer
+ * @l1: length of @m1
+ * @m2: pointer to another buffer
+ * @l2: length of @m2
+ *
+ * Debugging macro to compare memory regions. If the comparison fails,
+ * an error message is logged and the application is either terminated
+ * or the testcase marked as failed.
+ *
+ * The effect of `g_assert_cmpmem (m1, l1, m2, l2)` is
+ * the same as `g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0)`.
+ * The advantage of this macro is that it can produce a message that
+ * includes the actual values of @l1 and @l2.
+ *
+ * |[<!-- language="C" -->
+ * g_assert_cmpmem (buf->data, buf->len, expected, sizeof (expected));
+ * ]|
+ *
+ * Since: 2.46
+ */
+
+
+/**
* g_assert_cmpstr:
* @s1: a string (may be %NULL)
* @cmp: The comparison operator to use.
* from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63,
* usually). To start searching from the 0th bit, set @nth_bit to -1.
*
- * Returns: the index of the first bit set which is higher than @nth_bit
+ * Returns: the index of the first bit set which is higher than @nth_bit, or -1
+ * if no higher bits are set
*/
* usually). To start searching from the last bit, set @nth_bit to
* -1 or GLIB_SIZEOF_LONG * 8.
*
- * Returns: the index of the first bit set which is lower than @nth_bit
+ * Returns: the index of the first bit set which is lower than @nth_bit, or -1
+ * if no lower bits are set
*/
* @errnum: the system error number. See the standard C %errno
* documentation
*
- * Returns a string corresponding to the given error code, e.g.
- * "no such process". You should use this function in preference to
- * strerror(), because it returns a string in UTF-8 encoding, and since
- * not all platforms support the strerror() function.
+ * Returns a string corresponding to the given error code, e.g. "no
+ * such process". Unlike strerror(), this always returns a string in
+ * UTF-8 encoding, and the pointer is guaranteed to remain valid for
+ * the lifetime of the process.
+ *
+ * Note that the string may be translated according to the current locale.
+ *
+ * The value of %errno will not be changed by this function.
*
* Returns: a UTF-8 string describing the error code. If the error code
- * is unknown, it returns "unknown error (<code>)".
+ * is unknown, it returns a string like "unknown error (<code>)".
*/
/**
* g_string_free:
- * @string: a #GString
+ * @string: (transfer full): a #GString
* @free_segment: if %TRUE, the actual character data is freed as well
*
* Frees the memory allocated for the #GString.
/**
* g_cclosure_marshal_BOOLEAN__FLAGS:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: a #GValue which can store the returned #gboolean
- * @n_param_values: 2
- * @param_values: a #GValue array holding instance and arg1
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter
- * denotes a flags type.
+ * A #GClosureMarshal function for use with signals with handlers that
+ * take a flags type as an argument and return a boolean. If you have
+ * such a signal, you will probably also need to use an accumulator,
+ * such as g_signal_accumulator_true_handled().
*/
/**
* g_cclosure_marshal_BOOL__FLAGS:
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
+ * An old alias for g_cclosure_marshal_BOOLEAN__FLAGS().
*/
/**
* g_cclosure_marshal_STRING__OBJECT_POINTER:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: a #GValue, which can store the returned string
- * @n_param_values: 3
- * @param_values: a #GValue array holding instance, arg1 and arg2
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with handlers that
+ * take a #GObject and a pointer and produce a string. It is highly
+ * unlikely that your signal handler fits this description.
*/
/**
* g_cclosure_marshal_VOID__BOOLEAN:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #gboolean parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single
+ * boolean argument.
*/
/**
* g_cclosure_marshal_VOID__BOXED:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #GBoxed* parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single
+ * argument which is any boxed pointer type.
*/
/**
* g_cclosure_marshal_VOID__CHAR:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #gchar parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gchar arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single
+ * character argument.
*/
/**
* g_cclosure_marshal_VOID__DOUBLE:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #gdouble parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with one
+ * double-precision floating point argument.
*/
/**
* g_cclosure_marshal_VOID__ENUM:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the enumeration parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes an enumeration type..
+ * A #GClosureMarshal function for use with signals with a single
+ * argument with an enumerated type.
*/
/**
* g_cclosure_marshal_VOID__FLAGS:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the flags parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes a flags type.
+ * A #GClosureMarshal function for use with signals with a single
+ * argument with a flags types.
*/
/**
* g_cclosure_marshal_VOID__FLOAT:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #gfloat parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with one
+ * single-precision floating point argument.
*/
/**
* g_cclosure_marshal_VOID__INT:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #gint parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gint arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single
+ * integer argument.
*/
/**
* g_cclosure_marshal_VOID__LONG:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #glong parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, glong arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with with a single
+ * long integer argument.
*/
/**
* g_cclosure_marshal_VOID__OBJECT:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #GObject* parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single
+ * #GObject argument.
*/
/**
* g_cclosure_marshal_VOID__PARAM:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single
+ * argument of type #GParamSpec.
*/
/**
* g_cclosure_marshal_VOID__POINTER:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #gpointer parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single raw
+ * pointer argument type.
+ *
+ * If it is possible, it is better to use one of the more specific
+ * functions such as g_cclosure_marshal_VOID__OBJECT() or
+ * g_cclosure_marshal_VOID__OBJECT().
*/
/**
* g_cclosure_marshal_VOID__STRING:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #gchar* parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single string
+ * argument.
*/
/**
* g_cclosure_marshal_VOID__UCHAR:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #guchar parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, guchar arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single
+ * unsigned character argument.
*/
/**
* g_cclosure_marshal_VOID__UINT:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #guint parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, guint arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with with a single
+ * unsigned integer argument.
*/
/**
* g_cclosure_marshal_VOID__UINT_POINTER:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 3
- * @param_values: a #GValue array holding instance, arg1 and arg2
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a unsigned int
+ * and a pointer as arguments.
*/
/**
* g_cclosure_marshal_VOID__ULONG:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #gulong parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gulong arg1, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with a single
+ * unsigned long integer argument.
*/
/**
* g_cclosure_marshal_VOID__VARIANT:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 2
- * @param_values: a #GValue array holding the instance and the #GVariant* parameter
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
- *
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)`.
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * Since: 2.26
+ * A #GClosureMarshal function for use with signals with a single
+ * #GVariant argument.
*/
/**
* g_cclosure_marshal_VOID__VOID:
- * @closure: the #GClosure to which the marshaller belongs
- * @return_value: ignored
- * @n_param_values: 1
- * @param_values: a #GValue array holding only the instance
- * @invocation_hint: the invocation hint given as the last argument
- * to g_closure_invoke()
- * @marshal_data: additional data specified when registering the marshaller
+ * @closure: A #GClosure.
+ * @return_value: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
*
- * A marshaller for a #GCClosure with a callback of type
- * `void (*callback) (gpointer instance, gpointer user_data)`.
+ * A #GClosureMarshal function for use with signals with no arguments.
*/
/**
* g_param_spec_get_default_value:
- * @param: a #GParamSpec
+ * @pspec: a #GParamSpec
*
- * Gets the default value of @param as a pointer to a #GValue.
+ * Gets the default value of @pspec as a pointer to a #GValue.
*
- * The #GValue will remain value for the life of @param.
+ * The #GValue will remain value for the life of @pspec.
*
* Returns: a pointer to a #GValue which must not be modified
* Since: 2.38
/**
+ * g_param_spec_get_name_quark:
+ * @param: a #GParamSpec
+ *
+ * Gets the GQuark for the name.
+ *
+ * Returns: the GQuark for @pspec->name.
+ * Since: 2.46
+ */
+
+
+/**
* g_param_spec_get_nick:
* @pspec: a valid #GParamSpec
*
import distutils
from distutils.msvccompiler import MSVCCompiler
+from distutils.unixccompiler import UnixCCompiler
from distutils.cygwinccompiler import Mingw32CCompiler
from distutils.sysconfig import customize_compiler
self.compiler = distutils.ccompiler.new_compiler(compiler=compiler_name)
customize_compiler(self.compiler)
- # customize_compiler from distutils only does customization
+ # customize_compiler() from distutils only does customization
# for 'unix' compiler type. Also, avoid linking to msvcrxx.dll
# for MinGW builds as the dumper binary does not link to the
# Python DLL, but link to msvcrt.dll if necessary.
if (isinstance(self.compiler, Mingw32CCompiler)):
self.compiler_cmd = self.compiler.compiler[0]
else:
- self.compiler_cmd = ''.join(self.compiler.executables['compiler'])
+ self.compiler_cmd = ' '.join(self.compiler.compiler)
self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
# An "internal" link is where the library to be introspected
# is being built in the current directory.
- # Search the current directory first
- # (This flag is not supported nor needed for Visual C++)
- if not self.check_is_msvc():
- args.append('-L.')
+ if not libtool:
+ # non-libtool case: prepare distutils use
+ if self.check_is_msvc():
+ for library in libraries:
+ # MSVC Builds don't use libtool, so no .la libraries,
+ # so just add the library directly.
+ self.compiler.add_library(library)
+ for libpath in libpaths:
+ self.compiler.add_library_dir(libpath)
+ else:
+ # Search the current directory first
+ # (This flag is not supported nor needed for Visual C++)
+ self.compiler.add_library_dir('.')
+ if os.name != 'nt':
+ self.compiler.add_runtime_library_dir('.')
- # https://bugzilla.gnome.org/show_bug.cgi?id=625195
- if not libtool:
+ # https://bugzilla.gnome.org/show_bug.cgi?id=625195
args.append('-Wl,-rpath=.')
+
+ # Ensure libraries are always linked as we are going to use ldd to work
+ # out their names later
args.append('-Wl,--no-as-needed')
- for library in libraries:
- if self.check_is_msvc():
- args.append(library + '.lib')
- else:
+ for library in libraries:
+ self.compiler.add_library(library)
+ if not self.check_is_msvc():
+ for library_path in libpaths:
+ args.append('-L' + library_path)
+ if os.path.isabs(library_path):
+ args.append('-Wl,-rpath=' + library_path)
+
+ else:
+ # libtool case: assemble linker command arguments, like we did before
+ args.append('-L.')
+ for library in libraries:
if library.endswith(".la"): # explicitly specified libtool library
args.append(library)
else:
args.append('-l' + library)
- for library_path in libpaths:
- # Not used/needed on Visual C++, and -Wl,-rpath options
- # will cause grief
- if not self.check_is_msvc():
+ for library_path in libpaths:
args.append('-L' + library_path)
if os.path.isabs(library_path):
- if libtool:
- args.append('-rpath')
- args.append(library_path)
- else:
- args.append('-Wl,-rpath=' + library_path)
+ args.append('-rpath')
+ args.append(library_path)
- def get_external_link_flags(self, args, libraries):
+ def get_external_link_flags(self, args, libtool, libraries):
# An "external" link is where the library to be introspected
# is installed on the system; this case is used for the scanning
# of GLib in gobject-introspection itself.
for library in libraries:
- if self.check_is_msvc():
- args.append(library + '.lib')
+ if not libtool:
+ self.compiler.add_library(library)
else:
if library.endswith(".la"): # explicitly specified libtool library
args.append(library)
include_dirs=include_dirs,
extra_postargs=extra_postargs)
+ def compile(self, pkg_config_cflags, cpp_includes, source, init_sections):
+ extra_postargs = []
+ includes = []
+ source_str = ''.join(source)
+ tmpdir_idx = source_str.rfind(os.sep, 0, source_str.rfind(os.sep))
+ (include_paths, macros, extra_args) = \
+ self._set_cpp_options(pkg_config_cflags)
+
+ for include in cpp_includes:
+ includes.append(include)
+
+ if isinstance(self.compiler, UnixCCompiler):
+ # This is to handle the case where macros are defined in CFLAGS
+ cflags = os.environ.get('CFLAGS')
+ if cflags:
+ for i, cflag in enumerate(cflags.split()):
+ if cflag.startswith('-D'):
+ stridx = cflag.find('=')
+ if stridx > -1:
+ macroset = (cflag[2:stridx],
+ cflag[stridx + 1:])
+ else:
+ macroset = (cflag[2:], None)
+ if macroset not in macros:
+ macros.append(macroset)
+
+ # Do not add -Wall when using init code as we do not include any
+ # header of the library being introspected
+ if self.compiler_cmd == 'gcc' and not init_sections:
+ extra_postargs.append('-Wall')
+ extra_postargs.append(self._cflags_no_deprecation_warnings)
+
+ includes.extend(include_paths)
+ extra_postargs.extend(extra_args)
+
+ return self.compiler.compile(sources=source,
+ macros=macros,
+ include_dirs=includes,
+ extra_postargs=extra_postargs,
+ output_dir=source_str[tmpdir_idx + 1:
+ source_str.rfind(os.sep)])
+
+ def link(self, output, objects, lib_args):
+ # Note: This is used for non-libtool builds only!
+ extra_preargs = []
+ extra_postargs = []
+ library_dirs = []
+ libraries = []
+
+ for arg in lib_args:
+ extra_postargs.append(arg)
+
+ self.compiler.link(target_desc=self.compiler.EXECUTABLE,
+ objects=objects,
+ output_filename=output,
+ extra_preargs=extra_preargs,
+ extra_postargs=extra_postargs)
+
def resolve_windows_libs(self, libraries, options):
args = []
libsearch = []
import subprocess
import shutil
import tempfile
+from distutils.errors import LinkError
from .gdumpparser import IntrospectionBinary
from . import utils
self._uninst_srcdir = os.environ.get('UNINSTALLED_INTROSPECTION_SRCDIR')
self._packages = ['gio-2.0 gmodule-2.0']
self._packages.extend(options.packages)
- self._linker_cmd = os.environ.get('CC', 'cc')
+ if hasattr(self._compiler.compiler, 'linker_exe'):
+ self._linker_cmd = self._compiler.compiler.linker_exe
+ else:
+ self._linker_cmd = []
# Public API
f.write(" " + func)
f.write("\n};\n")
- # Microsoft compilers generate intermediate .obj files
- # during compilation, unlike .o files like GCC and others
- if self._compiler.check_is_msvc():
- o_path = self._generate_tempfile(tmpdir, '.obj')
- else:
- o_path = self._generate_tempfile(tmpdir, '.o')
-
- if os.name == 'nt':
- ext = '.exe'
+ if self._compiler.compiler.exe_extension:
+ ext = self._compiler.compiler.exe_extension
else:
ext = ''
bin_path = self._generate_tempfile(tmpdir, ext)
try:
- self._compile(o_path, c_path)
+ introspection_obj = self._compile(c_path)
except CompilerError as e:
if not utils.have_debug_flag('save-temps'):
shutil.rmtree(tmpdir)
raise SystemExit('compilation of temporary binary failed:' + str(e))
try:
- self._link(bin_path, o_path)
+ self._link(bin_path, introspection_obj)
except LinkerError as e:
if not utils.have_debug_flag('save-temps'):
shutil.rmtree(tmpdir)
stdout=subprocess.PIPE)
return proc.communicate()[0].split()
- def _compile(self, output, *sources):
- # Not strictly speaking correct, but easier than parsing shell
- args = self._compiler.compiler_cmd.split()
- # Do not add -Wall when using init code as we do not include any
- # header of the library being introspected
- if self._compiler.compiler_cmd == 'gcc' and not self._options.init_sections:
- args.append('-Wall')
- # The Microsoft compiler uses different option flags for
- # silencing warnings on deprecated function usage
- if self._compiler.check_is_msvc():
- args.append("-wd4996")
- else:
- args.append("-Wno-deprecated-declarations")
+ def _compile(self, *sources):
pkgconfig_flags = self._run_pkgconfig('--cflags')
- args.extend([utils.cflag_real_include_path(f) for f in pkgconfig_flags])
- cppflags = os.environ.get('CPPFLAGS', '')
- for cppflag in cppflags.split():
- args.append(cppflag)
- cflags = os.environ.get('CFLAGS', '')
- for cflag in cflags.split():
- args.append(cflag)
- for include in self._options.cpp_includes:
- args.append('-I' + include)
- # The Microsoft compiler uses different option flags for
- # compilation result output
- if self._compiler.check_is_msvc():
- args.extend(['-c', '-Fe' + output, '-Fo' + output])
- else:
- args.extend(['-c', '-o', output])
- for source in sources:
- if not os.path.exists(source):
- raise CompilerError(
- "Could not find c source file: %s" % (source, ))
- args.extend(list(sources))
- if not self._options.quiet:
- print "g-ir-scanner: compile: %s" % (
- subprocess.list2cmdline(args), )
- sys.stdout.flush()
- try:
- subprocess.check_call(args)
- except subprocess.CalledProcessError as e:
- raise CompilerError(e)
+ return self._compiler.compile(pkgconfig_flags,
+ self._options.cpp_includes,
+ sources,
+ self._options.init_sections)
- def _link(self, output, *sources):
+ def _link(self, output, sources):
args = []
libtool = utils.get_libtool_command(self._options)
if libtool:
+ # Note: MSVC Builds do not use libtool!
+ # In the libtool case, put together the linker command, as we did before.
+ # We aren't using distutils to link in this case.
args.extend(libtool)
args.append('--mode=link')
args.append('--tag=CC')
if self._options.quiet:
args.append('--silent')
- args.extend(self._linker_cmd.split())
- # We can use -o for the Microsoft compiler/linker,
- # but it is considered deprecated usage with that
- if self._compiler.check_is_msvc():
- args.extend(['-Fe' + output])
- else:
+ args.extend(self._linker_cmd)
+
args.extend(['-o', output])
- if libtool:
if os.name == 'nt':
args.append('-Wl,--export-all-symbols')
else:
args.append('-export-dynamic')
- cppflags = os.environ.get('CPPFLAGS', '')
- for cppflag in cppflags.split():
- args.append(cppflag)
- cflags = os.environ.get('CFLAGS', '')
- for cflag in cflags.split():
- args.append(cflag)
- ldflags = os.environ.get('LDFLAGS', '')
- for ldflag in ldflags.split():
- args.append(ldflag)
+ if not self._compiler.check_is_msvc():
+ # These envvars are not used for MSVC Builds!
+ # MSVC Builds use the INCLUDE, LIB envvars,
+ # which are automatically picked up during
+ # compilation and linking
+ cppflags = os.environ.get('CPPFLAGS', '')
+ for cppflag in cppflags.split():
+ args.append(cppflag)
+ cflags = os.environ.get('CFLAGS', '')
+ for cflag in cflags.split():
+ args.append(cflag)
+ ldflags = os.environ.get('LDFLAGS', '')
+ for ldflag in ldflags.split():
+ args.append(ldflag)
# Make sure to list the library to be introspected first since it's
# likely to be uninstalled yet and we want the uninstalled RPATHs have
# priority (or we might run with installed library that is older)
-
for source in sources:
if not os.path.exists(source):
raise CompilerError(
"Could not find object file: %s" % (source, ))
- args.extend(list(sources))
+
+ if libtool:
+ args.extend(sources)
pkg_config_libs = self._run_pkgconfig('--libs')
else:
args.extend(pkg_config_libs)
- self._compiler.get_external_link_flags(args, self._options.libraries)
-
- if not self._options.quiet:
- print "g-ir-scanner: link: %s" % (
- subprocess.list2cmdline(args), )
- sys.stdout.flush()
- msys = os.environ.get('MSYSTEM', None)
- if msys:
- shell = os.environ.get('SHELL', 'sh.exe')
- # Create a temporary script file that
- # runs the command we want
- tf, tf_name = tempfile.mkstemp()
- with os.fdopen(tf, 'wb') as f:
- shellcontents = ' '.join([x.replace('\\', '/') for x in args])
- fcontents = '#!/bin/sh\nunset PWD\n{}\n'.format(shellcontents)
- f.write(fcontents)
- shell = utils.which(shell)
- args = [shell, tf_name.replace('\\', '/')]
- try:
- subprocess.check_call(args)
- except subprocess.CalledProcessError as e:
- raise LinkerError(e)
- finally:
+ self._compiler.get_external_link_flags(args,
+ libtool,
+ self._options.libraries)
+
+ if not libtool:
+ # non-libtool: prepare distutils for linking the introspection
+ # dumper program...
+ try:
+ self._compiler.link(output,
+ sources,
+ args)
+
+ # Ignore failing to embed the manifest files, when the manifest
+ # file does not exist, especially for MSVC 2010 and later builds.
+ # If we are on Visual C++ 2005/2008, where
+ # this embedding is required, the build will fail anyway, as
+ # the dumper program will likely fail to run, and this means
+ # something went wrong with the build.
+ except LinkError, e:
+ if self._compiler.check_is_msvc():
+ msg = str(e)
+
+ if msg[msg.rfind('mt.exe'):] == 'mt.exe\' failed with exit status 31':
+ sys.exc_clear()
+ pass
+ else:
+ raise LinkError(e)
+ else:
+ raise LinkError(e)
+ else:
+ # libtool: Run the assembled link command, we don't use distutils
+ # for linking here.
+ if not self._options.quiet:
+ print "g-ir-scanner: link: %s" % (
+ subprocess.list2cmdline(args), )
+ sys.stdout.flush()
+ msys = os.environ.get('MSYSTEM', None)
if msys:
- os.remove(tf_name)
+ shell = os.environ.get('SHELL', 'sh.exe')
+ # Create a temporary script file that
+ # runs the command we want
+ tf, tf_name = tempfile.mkstemp()
+ with os.fdopen(tf, 'wb') as f:
+ shellcontents = ' '.join([x.replace('\\', '/') for x in args])
+ fcontents = '#!/bin/sh\nunset PWD\n{}\n'.format(shellcontents)
+ f.write(fcontents)
+ shell = utils.which(shell)
+ args = [shell, tf_name.replace('\\', '/')]
+ try:
+ subprocess.check_call(args)
+ except subprocess.CalledProcessError as e:
+ raise LinkerError(e)
+ finally:
+ if msys:
+ os.remove(tf_name)
def compile_introspection_binary(options, get_type_functions,
Name: gobject-introspection
Description: GObject Introspection
-Version: 1.45.4
+Version: 1.46.0
Name: gobject-introspection
Description: GObject Introspection
-Version: 1.45.4
+Version: 1.46.0
--- /dev/null
+<?xml version="1.0"?>
+<page id="Regress.func_obj_nullable_in"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>void</api:type>
+ </api:returns>
+ <api:name>regress_func_obj_nullable_in</api:name>
+ <api:arg>
+ <api:type>RegressTestObj*</api:type>
+ <api:name>obj</api:name>
+ </api:arg>
+ </api:function>
+ </info>
+ <title>regress_func_obj_nullable_in</title>
+ <synopsis><code mime="text/x-csrc">
+void regress_func_obj_nullable_in (RegressTestObj* obj);
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>obj</code></title>
+ <p>A <link xref="Regress.TestObj"/></p>
+</item>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
--- /dev/null
+<?xml version="1.0"?>
+<page id="Regress.func_obj_nullable_in"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>void</api:type>
+ </api:returns>
+ <api:name>regress_func_obj_nullable_in</api:name>
+ <api:arg>
+ <api:type>Regress.TestObj</api:type>
+ <api:name>obj</api:name>
+ </api:arg>
+ </api:function>
+ </info>
+ <title>Regress.func_obj_nullable_in</title>
+ <synopsis><code mime="text/x-gjs">
+function func_obj_nullable_in(obj: <link xref="Regress.TestObj">Regress.TestObj</link>): void {
+ // Gjs wrapper for regress_func_obj_nullable_in()
+}
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>obj</code></title>
+ <p>A <link xref="Regress.TestObj"/></p>
+</item>
+</terms>
+
+</page>
--- /dev/null
+<?xml version="1.0"?>
+<page id="Regress.func_obj_nullable_in"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>none</api:type>
+ </api:returns>
+ <api:name>regress_func_obj_nullable_in</api:name>
+ <api:arg>
+ <api:type>Regress.TestObj</api:type>
+ <api:name>obj</api:name>
+ </api:arg>
+ </api:function>
+ </info>
+ <title>Regress.func_obj_nullable_in</title>
+ <synopsis><code mime="text/x-python">
+@accepts(Regress.TestObj)
+@returns(none)
+def func_obj_nullable_in(obj):
+ # Python wrapper for regress_func_obj_nullable_in()
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>obj</code></title>
+ <p>A <link xref="Regress.TestObj"/></p>
+</item>
+</terms>
+
+</page>
</parameter>
</parameters>
</function>
+ <function name="func_obj_nullable_in"
+ c:identifier="regress_func_obj_nullable_in">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <parameter name="obj"
+ transfer-ownership="none"
+ nullable="1"
+ allow-none="1">
+ <doc xml:space="preserve">A #RegressTestObj</doc>
+ <type name="TestObj" c:type="RegressTestObj*"/>
+ </parameter>
+ </parameters>
+ </function>
<function name="global_get_flags_out"
c:identifier="regress_global_get_flags_out">
<return-value transfer-ownership="none">
regress_foo_test_varargs_callback2
regress_foo_test_varargs_callback3
regress_func_obj_null_in
+regress_func_obj_nullable_in
regress_global_get_flags_out
regress_has_parameter_named_attrs
regress_introspectable_via_alias
}
/**
+ * regress_func_obj_nullable_in:
+ * @obj: (nullable): A #RegressTestObj
+ */
+void
+regress_func_obj_nullable_in (RegressTestObj *obj)
+{
+}
+
+/**
* regress_test_array_fixed_out_objects:
* @objs: (out) (array fixed-size=2) (transfer full): An array of #RegressTestObj
*/
_GI_TEST_EXTERN
void regress_test_obj_null_out (RegressTestObj **obj);
+void regress_func_obj_nullable_in (RegressTestObj *obj);
+
/* inheritance */
#define REGRESS_TEST_TYPE_SUB_OBJ (regress_test_sub_obj_get_type ())
#define REGRESS_TEST_SUB_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_SUB_OBJ, RegressTestSubObj))