diff -Nru gobject-introspection-1.31.10/docs/reference/html/index.sgml gobject-introspection-1.31.20/docs/reference/html/index.sgml
--- gobject-introspection-1.31.10/docs/reference/html/index.sgml 2012-01-19 22:13:00.000000000 +0000
+++ gobject-introspection-1.31.20/docs/reference/html/index.sgml 2012-03-05 14:48:09.000000000 +0000
@@ -283,6 +283,7 @@
+
Binary files /tmp/r19mchCfIJ/gobject-introspection-1.31.10/docs/reference/html/overview.png and /tmp/ttCZDbu35t/gobject-introspection-1.31.20/docs/reference/html/overview.png differ
diff -Nru gobject-introspection-1.31.10/gir/gio-2.0.c gobject-introspection-1.31.20/gir/gio-2.0.c
--- gobject-introspection-1.31.10/gir/gio-2.0.c 2012-01-19 22:06:34.000000000 +0000
+++ gobject-introspection-1.31.20/gir/gio-2.0.c 2012-03-05 14:44:06.000000000 +0000
@@ -133,10 +133,9 @@
* @get_action_state_hint: the virtual function pointer for g_action_group_get_action_state_hint()
* @get_action_enabled: the virtual function pointer for g_action_group_get_action_enabled()
* @get_action_state: the virtual function pointer for g_action_group_get_action_state()
- * @set_action_state: the virtual function pointer for g_action_group_set_action_state()
+ * @change_action_state: the virtual function pointer for g_action_group_change_action_state()
* @query_action: the virtual function pointer for g_action_group_query_action()
* @activate_action: the virtual function pointer for g_action_group_activate_action()
- * @change_action_state: the virtual function pointer for g_action_group_change_action_state()
* @action_added: the class closure for the #GActionGroup::action-added signal
* @action_removed: the class closure for the #GActionGroup::action-removed signal
* @action_enabled_changed: the class closure for the #GActionGroup::action-enabled-changed signal
@@ -260,7 +259,7 @@
*
* The ::command-line signal is emitted on the primary instance when
* a commandline is not handled locally. See g_application_run() and
- * the #GApplicationCommandline documentation for more information.
+ * the #GApplicationCommandLine documentation for more information.
*
* process. See g_application_command_line_set_exit_status().
*
@@ -1397,6 +1396,7 @@
* @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
* @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
* @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
+ * @dup_object: Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32.
*
* Base type for D-Bus interfaces.
*
@@ -2203,6 +2203,10 @@
* that both @changed_properties and @invalidated_properties are
* guaranteed to never be %NULL (either may be empty though).
*
+ * If the proxy has the flag
+ * %G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES set, then
+ * @invalidated_properties will always be empty.
+ *
* This signal corresponds to the
* PropertiesChanged D-Bus signal on the
* org.freedesktop.DBus.Properties interface.
@@ -2327,7 +2331,7 @@
/**
* GDBusProxy:g-name-owner:
*
- * The unique name that owns #GDBusProxy:name or %NULL if no-one
+ * The unique name that owns #GDBusProxy:g-name or %NULL if no-one
* currently owns that name. You may connect to #GObject::notify signal to
* track changes to this property.
*
@@ -2361,6 +2365,7 @@
* @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
* @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
* @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If not set and the proxy if for a well-known name, then request the bus to launch an owner for the name if no-one owns the name. This flag can only be used in proxies for well-known names.
+ * @G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES: If set, the property value for any invalidated property will be (asynchronously) retrieved upon receiving the PropertiesChanged D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32.
*
* Flags used when constructing an instance of a #GDBusProxy derived class.
*
@@ -3413,9 +3418,9 @@
/**
* GIOErrorEnum:
* @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
- * @G_IO_ERROR_NOT_FOUND: File not found error.
- * @G_IO_ERROR_EXISTS: File already exists error.
- * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
+ * @G_IO_ERROR_NOT_FOUND: File not found.
+ * @G_IO_ERROR_EXISTS: File already exists.
+ * @G_IO_ERROR_IS_DIRECTORY: File is a directory.
* @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
* @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
* @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
@@ -3483,8 +3488,8 @@
/**
* GIOModuleScopeFlags:
- * @G_IO_MODULES_SCOPE_NONE: No module scan flags
- * @G_IO_MODULES_SCOPE_BLOCK_DUPLICATES: When using this scope to load or scan modules, automatically block a modules which has the same base basename as previously loaded module.
+ * @G_IO_MODULE_SCOPE_NONE: No module scan flags
+ * @G_IO_MODULE_SCOPE_BLOCK_DUPLICATES: When using this scope to load or scan modules, automatically block a modules which has the same base basename as previously loaded module.
*
* Flags for use with g_io_module_scope_new().
*
@@ -3841,6 +3846,82 @@
/**
+ * GLIB_VERSION_2_26:
+ *
+ * A macro that evaluates to the 2.26 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_28:
+ *
+ * A macro that evaluates to the 2.28 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_30:
+ *
+ * A macro that evaluates to the 2.30 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_32:
+ *
+ * A macro that evaluates to the 2.32 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MAX_ALLOWED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the upper bound for the GLib API to use.
+ *
+ * If a function has been introduced in a newer version of GLib,
+ * it is possible to use this symbol to get compiler warnings when
+ * trying to use that function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the lower bound for the GLib API to use.
+ *
+ * If a function has been deprecated in a newer version of GLib,
+ * it is possible to use this symbol to avoid the compiler warnings
+ * without disabling warning for every deprecated function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* GLoadableIcon:
*
* Generic type for all kinds of icons that can be loaded
@@ -4124,7 +4205,7 @@
* @g_iface: The parent interface.
* @changed: Changed signal that is emitted when the mount's state has changed.
* @unmounted: The unmounted signal that is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.
- * @pre_unmount: The pre_unmout signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.
+ * @pre_unmount: The ::pre-unmount signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.
* @get_root: Gets a #GFile to the root directory of the #GMount.
* @get_name: Gets a string containing the name of the #GMount.
* @get_icon: Gets a #GIcon for the #GMount.
@@ -4140,7 +4221,7 @@
* @remount: Starts remounting a #GMount.
* @remount_finish: Finishes a remounting operation.
* @guess_content_type: Starts guessing the type of the content of a #GMount. See g_mount_guess_content_type() for more information on content type guessing. This operation was added in 2.18.
- * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
+ * @guess_content_type_finish: Finishes a content type guessing operation. Added in 2.18.
* @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
* @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
* @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
@@ -5175,8 +5256,9 @@
* GProxyInterface:
* @g_iface: The parent interface.
* @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
- * @connect_async: Same has connect() but asynchronous.
+ * @connect_async: Same as connect() but asynchronous.
* @connect_finish: Returns the result of connect_async()
+ * @supports_hostname: Returns whether the proxy supports hostname lookups.
*
* Provides an interface for handling proxy connection and payload.
*
@@ -5430,7 +5512,7 @@
* @tell: Tells the current location within a stream.
* @can_seek: Checks if seeking is supported by the stream.
* @seek: Seeks to a location within a stream.
- * @can_truncate: Chekcs if truncation is suppored by the stream.
+ * @can_truncate: Checks if truncation is supported by the stream.
* @truncate_fn: Truncates a stream.
*
* Provides an interface for implementing seekable functionality on I/O Streams.
@@ -5719,6 +5801,15 @@
/**
+ * GSignalCVaMarshaller:
+ *
+ * This is the signature of va_list marshaller functions, an optional
+ * marshaller that can be used in some situations to avoid
+ * marshalling the signal argument into GValues.
+ */
+
+
+/**
* GSignalEmissionHook:
* @ihint: Signal invocation hint, see #GSignalInvocationHint.
* @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
@@ -6107,7 +6198,7 @@
* Each event except %G_SOCKET_CLIENT_COMPLETE may be emitted
* multiple times (or not at all) for a given connectable (in
* particular, if @client ends up attempting to connect to more than
- * one address). However, if @client emits the #GSocketClient:event
+ * one address). However, if @client emits the #GSocketClient::event
* signal at all for a given connectable, that it will always emit
* it with %G_SOCKET_CLIENT_COMPLETE when it is done.
*
@@ -6423,7 +6514,8 @@
* @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
* @G_SPAWN_ERROR_ACCES: execv() returned EACCES
* @G_SPAWN_ERROR_PERM: execv() returned EPERM
- * @G_SPAWN_ERROR_2BIG: execv() returned E2BIG
+ * @G_SPAWN_ERROR_TOO_BIG: execv() returned E2BIG
+ * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG
* @G_SPAWN_ERROR_NOEXEC: execv() returned ENOEXEC
* @G_SPAWN_ERROR_NAMETOOLONG: execv() returned ENAMETOOLONG
* @G_SPAWN_ERROR_NOENT: execv() returned ENOENT
@@ -6972,8 +7064,9 @@
* @G_TLS_DATABASE_LOOKUP_NONE: No lookup flags
* @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have a private key.
*
- * Flags for g_tls_database_lookup_handle(), g_tls_database_lookup_issuer(),
- * and g_tls_database_lookup_issued().
+ * Flags for g_tls_database_lookup_certificate_handle(),
+ * g_tls_database_lookup_certificate_issuer(),
+ * and g_tls_database_lookup_certificates_issued_by().
*
* Since: 2.30
*/
@@ -7444,6 +7537,8 @@
* @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
* @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
* @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
+ * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32
+ * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32
*
* These are the possible line break classifications.
*
@@ -7544,6 +7639,13 @@
* @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
* @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
* @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
+ * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, Meroitic Hieroglyphs. Since: 2.32
+ * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32
+ * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32
+ * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32
+ * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32
*
* The #GUnicodeScript enumeration identifies different writing
* systems. The values correspond to the names as defined in the
@@ -9688,6 +9790,7 @@
* Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
*
* Returns: %TRUE on success.
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -10097,6 +10200,8 @@
* @pspec: a valid #GParamSpec instance
*
* Cast a #GParamSpec instance into a #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -11282,6 +11387,8 @@
* G_TYPE_PARAM_VALUE_ARRAY:
*
* The #GType of #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -11470,6 +11577,8 @@
*
* The type ID of the "GValueArray" type which is a boxed type,
* used to pass around pointers to GValueArrays.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -12081,6 +12190,24 @@
/**
+ * G_VOLUME_IDENTIFIER_KIND_CLASS:
+ *
+ * The string used to obtain the volume class
+ * with g_volume_get_identifier().
+ *
+ * Known volume classes include device and
+ * network. Other classes may be added in the
+ * future.
+ *
+ * This is intended to be used by applications to classify #GVolume
+ * instances into different sections - for example a file manager or
+ * file chooser can use this information to show
+ * network volumes under a "Network" heading and
+ * device volumes under a "Devices" heading.
+ */
+
+
+/**
* G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
*
* The string used to obtain a Hal UDI with g_volume_get_identifier().
@@ -12285,7 +12412,7 @@
* detail.
*
* To access an exported #GActionGroup remotely, use
- * g_dbus_action_group_new() to obtain a #GDBusActionGroup.
+ * g_dbus_action_group_get() to obtain a #GDBusActionGroup.
*/
@@ -12420,10 +12547,8 @@
* g_action_group_activate_action() on the application, it is always
* invoked in the primary instance. The actions are also exported on
* the session bus, and GIO provides the #GDBusActionGroup wrapper to
- * conveniently access them remotely. Additionally, g_application_set_app_menu()
- * and g_application_set_menubar() can be used to export representation
- * data for the actions, in the form of #GMenuModels. GIO provides
- * a #GDBusMenuModel wrapper for remote access to exported #GMenuModels.
+ * conveniently access them remotely. GIO provides a #GDBusMenuModel wrapper
+ * for remote access to exported #GMenuModels.
*
* There is a number of different entry points into a GApplication:
*
@@ -12441,7 +12566,7 @@
* in the form of a #GVariant dictionary mapping strings to variants.
* To use platform data, override the @before_emit or @after_emit virtual
* functions in your #GApplication subclass. When dealing with
- * #GApplicationCommandline objects, the platform data is directly
+ * #GApplicationCommandLine objects, the platform data is directly
* available via g_application_command_line_get_cwd(),
* g_application_command_line_get_environ() and
* g_application_command_line_get_platform_data().
@@ -12451,7 +12576,7 @@
* "cwd"), and optionally the environment (ie the set of environment
* variables and their values) of the calling process (key "environ").
* The environment is only added to the platform data if the
- * #G_APPLICATION_SEND_ENVIONMENT flag is set. GApplication subclasses
+ * %G_APPLICATION_SEND_ENVIRONMENT flag is set. #GApplication subclasses
* can add their own platform data by overriding the @add_platform_data
* virtual function. For instance, #GtkApplication adds startup notification
* data in this way.
@@ -12514,7 +12639,7 @@
* of this object (ie: the process exits when the last reference is
* dropped).
*
- * The main use for #GApplicationCommandline (and the
+ * The main use for #GApplicationCommandLine (and the
* #GApplication::command-line signal) is 'Emacs server' like use cases:
* You can set the EDITOR environment variable to have
* e.g. git use your favourite editor to edit commit messages, and if you
@@ -12556,7 +12681,7 @@
*
* An example of deferred commandline handling. Here, the commandline is
* not completely handled before the #GApplication::command-line handler
- * returns. Instead, we keep a reference to the GApplicationCommandline
+ * returns. Instead, we keep a reference to the GApplicationCommandLine
* object and handle it later(in this example, in an idle). Note that it
* is necessary to hold the application until you are done with the
* commandline.
@@ -13036,17 +13161,17 @@
* (i.e. connect to D-Bus): for instance, g_dbus_connection_new() and
* g_bus_get(), and the synchronous versions of those methods, give you an
* initialized connection. Language bindings for GIO should use
- * g_initable_new() or g_async_initable_new(), which also initialize the
+ * g_initable_new() or g_async_initable_new_async(), which also initialize the
* connection.
*
* If you construct an uninitialized #GDBusConnection, such as via
* g_object_new(), you must initialize it via g_initable_init() or
- * g_async_initable_init() before using its methods or properties. Calling
- * methods or accessing properties on a #GDBusConnection that has not completed
- * initialization successfully is considered to be invalid, and leads to
- * undefined behaviour. In particular, if initialization fails with a #GError,
- * the only valid thing you can do with that #GDBusConnection is to free it
- * with g_object_unref().
+ * g_async_initable_init_async() before using its methods or properties.
+ * Calling methods or accessing properties on a #GDBusConnection that has not
+ * completed initialization successfully is considered to be invalid, and leads
+ * to undefined behaviour. In particular, if initialization fails with a
+ * #GError, the only valid thing you can do with that #GDBusConnection is to
+ * free it with g_object_unref().
*
* D-Bus server exampleFIXME: MISSING XINCLUDE CONTENT
*
@@ -13631,15 +13756,15 @@
* using wildcards, e.g. "standard::*" will return all of the keys in the
* "standard" namespace.
*
- * Values are stored within the list in #GFileAttributeValue structures.
- * Values can store different types, listed in the enum #GFileAttributeType.
- * Upon creation of a #GFileAttributeValue, the type will be set to
- * %G_FILE_ATTRIBUTE_TYPE_INVALID.
- *
* The list of possible attributes for a filesystem (pointed to by a #GFile) is
* available as a #GFileAttributeInfoList. This list is queryable by key names
* as indicated earlier.
*
+ * Information is stored within the list in #GFileAttributeInfo structures.
+ * The info structure can store different types, listed in the enum
+ * #GFileAttributeType. Upon creation of a #GFileAttributeInfo, the type will
+ * be set to %G_FILE_ATTRIBUTE_TYPE_INVALID.
+ *
* Classes that implement #GFileIface will create a #GFileAttributeInfoList and
* install default keys and values for their given file system, architecture,
* and other possible implementation details (e.g., on a UNIX system, a file
@@ -13896,7 +14021,7 @@
* stream to jump to arbitrary positions in the file, provided the
* filesystem of the file allows it. To find the position of a file
* input stream, use g_seekable_tell(). To find out if a file input
- * stream supports seeking, use g_seekable_stream_can_seek().
+ * stream supports seeking, use g_seekable_can_seek().
* To position a file input stream, use g_seekable_seek().
*/
@@ -14244,9 +14369,6 @@
* a regular item, use g_menu_insert(). To add a section, use
* g_menu_insert_section(). To add a submenu, use
* g_menu_insert_submenu().
- *
- * Often it is more convenient to create a #GMenu from an XML
- * fragment, using GMenu Markup.
*/
@@ -14266,48 +14388,6 @@
/**
- * SECTION:gmenumarkup
- * @title: GMenu Markup
- * @short_description: parsing and printing GMenuModel XML
- *
- * The functions here allow to instantiate #GMenuModels by parsing
- * fragments of an XML document.
- * * The XML format for #GMenuModel consists of a toplevel
- * menu element, which contains one or more
- * item elements. Each item
- * element contains attribute and link
- * elements with a mandatory name attribute.
- * link elements have the same content
- * model as menu.
- *
- * Here is the XML for :
- * |[FIXME: MISSING XINCLUDE CONTENT]|
- *
- * The parser also understands a somewhat less verbose format, in which
- * attributes are encoded as actual XML attributes of item
- * elements, and link elements are replaced by
- * section and submenu elements.
- *
- * Here is how the example looks in this format:
- * |[FIXME: MISSING XINCLUDE CONTENT]|
- *
- * The parser can obtaing translations for attribute values using gettext.
- * To make use of this, the menu element must
- * have a domain attribute which specifies the gettext domain to use, and
- * attribute elements can be marked for translation
- * with a translatable="yes" attribute. It is also possible
- * to specify message context and translator comments, using the context
- * and comments attributes.
- *
- * The following DTD describes the XML format approximately:
- * |[FIXME: MISSING XINCLUDE CONTENT]|
- *
- * To serialize a #GMenuModel into an XML fragment, use
- * g_menu_markup_print_string().
- */
-
-
-/**
* SECTION:gmenumodel
* @title: GMenuModel
* @short_description: An abstract class representing the contents of a menu
@@ -14450,7 +14530,7 @@
* SECTION:gmount
* @short_description: Mount management
* @include: gio/gio.h
- * @see_also: GVolume, GUnixMount
+ * @see_also: GVolume, GUnixMountEntry, GUnixMountPoint
*
* The #GMount interface represents user-visible mounts. Note, when
* porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
@@ -14461,8 +14541,8 @@
* might not be related to a volume object.
*
* Unmounting a #GMount instance is an asynchronous operation. For
- * more information about asynchronous operations, see #GAsyncReady
- * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
+ * more information about asynchronous operations, see #GAsyncResult
+ * and #GSimpleAsyncResult. To unmount a #GMount instance, first call
* g_mount_unmount_with_operation() with (at least) the #GMount instance and a
* #GAsyncReadyCallback. The callback will be fired when the
* operation has resolved (either with success or failure), and a
@@ -14517,7 +14597,9 @@
* @short_description: Network status monitor
* @include: gio/gio.h
*
- *
+ * #GNetworkMonitor provides an easy-to-use cross-platform API
+ * for monitoring network connectivity. On Linux, the implementation
+ * is based on the kernels netlink interface.
*/
@@ -14698,7 +14780,7 @@
* GMenu markup xml, CSS files, icons, etc. These are often shipped as files in $datadir/appname, or
* manually included as literal strings in the code.
*
- * The #GResource API and the glib-compile-resources program
+ * The #GResource API and the glib-compile-resources program
* provide a convenient and efficient alternative to this which has some nice properties. You
* maintain the files as normal files, so its easy to edit them, but during the build the files
* are combined into a binary bundle that is linked into the executable. This means that loading
@@ -14710,7 +14792,23 @@
* in a compressed form, but will be automatically uncompressed when the resource is used. This
* is very useful e.g. for larger text files that are parsed once (or rarely) and then thrown away.
*
- * Resource bundles are created by the glib-compile-resources program
+ * Resource files can also be marked to be preprocessed, by setting the value of the
+ * preprocess attribute to a comma-separated list of preprocessing options.
+ * The only options currently supported are:
+ *
+ * xml-stripblanks which will use xmllint to strip
+ * ignorable whitespace from the xml file. For this to work, the XMLLINT
+ * environment variable must be set to the full path to the xmllint executable, or xmllint
+ * must be in the PATH; otherwise the preprocessing step is skipped.
+ *
+ * to-pixdata which will use gdk-pixbuf-pixdata to convert
+ * images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside
+ * the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata
+ * program must be in the PATH, or the GDK_PIXBUF_PIXDATA environment variable must be
+ * set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will
+ * abort.
+ *
+ * Resource bundles are created by the glib-compile-resources program
* which takes an xml file that describes the bundle, and a set of files that the xml references. These
* are combined into a binary resource bundle.
*
@@ -14721,7 +14819,7 @@
*
* data/splashscreen.png
* dialog.ui
- * menumarkup.xml
+ * menumarkup.xml
*
*
* ]]>
@@ -14736,7 +14834,7 @@
* Note that all resources in the process share the same namespace, so use java-style
* path prefixes (like in the above example) to avoid conflicts.
*
- * You can then use glib-compile-resources to compile the xml to a
+ * You can then use glib-compile-resources to compile the xml to a
* binary bundle that you can load with g_resource_load(). However, its more common to use the --generate-source and
* --generate-header arguments to create a source file and header to link directly into your application.
*
@@ -15381,8 +15479,8 @@
* @include: gio/gio.h
* @see_also: #GSocketConnection, #GSocketListener
*
- * #GSocketClient is a high-level utility class for connecting to a
- * network host using a connection oriented socket type.
+ * #GSocketClient is a lightweight high-level utility class for connecting to
+ * a network host using a connection oriented socket type.
*
* You create a #GSocketClient object, set any options you want, and then
* call a sync or async connect operation, which returns a #GSocketConnection
@@ -15392,6 +15490,9 @@
* the underlying socket that is in use. For instance, for a TCP/IP connection
* it will be a #GTcpConnection.
*
+ * As #GSocketClient is a lightweight object, you don't need to cache it. You
+ * can just create a new one any time you need one.
+ *
* Since: 2.22
*/
@@ -16000,8 +16101,8 @@
* equivalent of #GnomeVFSDrive.
*
* Mounting a #GVolume instance is an asynchronous operation. For more
- * information about asynchronous operations, see #GAsyncReady and
- * #GSimpleAsyncReady. To mount a #GVolume, first call
+ * information about asynchronous operations, see #GAsyncResult and
+ * #GSimpleAsyncResult. To mount a #GVolume, first call
* g_volume_mount() with (at least) the #GVolume instance, optionally
* a #GMountOperation object and a #GAsyncReadyCallback.
*
@@ -16035,7 +16136,7 @@
* when the gvfs hal volume monitor is in use. Other volume monitors
* will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
* identifier, which can be used to obtain a hal device by means of
- * libhal_manger_find_device_string_match().
+ * libhal_manager_find_device_string_match().
*/
@@ -16626,7 +16727,7 @@
* g_action_group_get_action_parameter_type(),
* g_action_group_get_action_state_type(),
* g_action_group_get_action_state_hint() and
- * g_action_group_get_state() with a single function call.
+ * g_action_group_get_action_state() with a single function call.
*
* This provides two main benefits.
*
@@ -17329,7 +17430,7 @@
*
* Activates the application.
*
- * In essence, this results in the #GApplication::activate() signal being
+ * In essence, this results in the #GApplication::activate signal being
* emitted in the primary instance.
*
* The application must be registered before calling this function.
@@ -17543,7 +17644,6 @@
/**
* g_application_get_default:
- * @returns: (transfer none): the default application for this process, or %NULL
*
* Returns the default #GApplication instance for this process.
*
@@ -17553,6 +17653,7 @@
*
* If there is no default application then %NULL is returned.
*
+ * Returns: (transfer none): the default application for this process, or %NULL
* Since: 2.32
*/
@@ -17697,6 +17798,24 @@
/**
+ * g_application_quit:
+ * @application: a #GApplication
+ *
+ * Immediately quits the application.
+ *
+ * Upon return to the mainloop, g_application_run() will return,
+ * calling only the 'shutdown' function before doing so.
+ *
+ * The hold count is ignored.
+ *
+ * The result of calling g_application_run() again after it returns is
+ * unspecified.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* g_application_register:
* @application: a #GApplication
* @cancellable: a #GCancellable, or %NULL
@@ -17780,7 +17899,7 @@
* If local_command_line() returns %FALSE then the application is registered
* and the #GApplication::command-line signal is emitted in the primary
* instance (which may or may not be this instance). The signal handler
- * gets passed a #GApplicationCommandline object that (among other things)
+ * gets passed a #GApplicationCommandLine object that (among other things)
* contains the remaining commandline arguments that have not been handled
* by local_command_line().
*
@@ -17800,7 +17919,7 @@
*
* If you need to handle commandline arguments that are not filenames,
* and you don't mind commandline handling to happen in the primary
- * instance, you should set %G_APPLICATION_HANDLED_COMMAND_LINE and
+ * instance, you should set %G_APPLICATION_HANDLES_COMMAND_LINE and
* process the commandline arguments in your #GApplication::command-line
* signal handler, either manually or using the #GOptionContext API.
*
@@ -19089,7 +19208,7 @@
* @inbuf_size: the number of bytes in @inbuf
* @outbuf: a buffer to write converted data in.
* @outbuf_size: the number of bytes in @outbuf, must be at least one
- * @flags: a #GConvertFlags controlling the conversion details
+ * @flags: a #GConverterFlags controlling the conversion details
* @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
* @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
* @error: location to store the error occurring, or %NULL to ignore
@@ -21499,6 +21618,20 @@
/**
+ * g_dbus_interface_dup_object:
+ * @interface_: An exported D-Bus interface.
+ *
+ * Gets the #GDBusObject that @interface_ belongs to, if any.
+ *
+ * reference should be freed with g_object_unref().
+ *
+ * Returns: (transfer full): A #GDBusObject or %NULL. The returned
+ * Since: 2.32
+ * Rename to: g_dbus_interface_get_object
+ */
+
+
+/**
* g_dbus_interface_get_info:
* @interface_: An exported D-Bus interface.
*
@@ -21511,11 +21644,16 @@
/**
- * g_dbus_interface_get_object:
+ * g_dbus_interface_get_object: (skip)
* @interface_: An exported D-Bus interface.
*
* Gets the #GDBusObject that @interface_ belongs to, if any.
*
+ * It is not safe to use the returned object if @interface_
+ * or the returned object is being used from other threads. See
+ * g_dbus_interface_dup_object() for a thread-safe
+ * alternative.
+ *
* reference belongs to @interface_ and should not be freed.
*
* Returns: (transfer none): A #GDBusObject or %NULL. The returned
@@ -21811,7 +21949,7 @@
* Stops exporting @interface_ on all connections it is exported on.
*
* To unexport @interface_ from only a single connection, use
- * g_dbus_interface_skeleton_export_from_connection()
+ * g_dbus_interface_skeleton_unexport_from_connection()
*
* Since: 2.30
*/
@@ -24409,7 +24547,7 @@
* @drive: a #GDrive
*
* Gets the kinds of identifiers that @drive has.
- * Use g_drive_get_identifer() to obtain the identifiers
+ * Use g_drive_get_identifier() to obtain the identifiers
* themselves.
*
* array of strings containing kinds of identifiers. Use g_strfreev()
@@ -25961,7 +26099,8 @@
* @src_info: source to copy attributes from.
* @dest_info: destination to copy attributes to.
*
- * Copies all of the #GFileAttributes from @src_info to @dest_info.
+ * Copies all of the GFileAttributes
+ * from @src_info to @dest_info.
*/
@@ -26363,7 +26502,8 @@
* @type: a #GFileAttributeType
* @value_p: pointer to the value
*
- * Sets the @attribute to contain the given value, if possible.
+ * Sets the @attribute to contain the given value, if possible. To unset the
+ * attribute, use %G_ATTRIBUTE_TYPE_INVALID for @type.
*/
@@ -27243,7 +27383,7 @@
* returned by g_get_tmp_dir()) and returns a #GFile and
* #GFileIOStream pointing to it.
*
- * @template should be a string in the GLib file name encoding
+ * @tmpl should be a string in the GLib file name encoding
* containing a sequence of six 'X' characters, and containing no
* directory components. If it is %NULL, a default template is used.
*
@@ -28818,18 +28958,6 @@
/**
- * g_inet_address_get_scope_id:
- * @address: a %G_SOCKET_FAMILY_IPV6 #GInetAddress
- *
- * Gets the sin6_scope_id field from @address,
- * which must be an IPv6 address.
- *
- * Returns: the scope id field
- * Since: 2.32
- */
-
-
-/**
* g_inet_address_mask_equal:
* @mask: a #GInetAddressMask
* @mask2: another #GInetAddressMask
@@ -29048,6 +29176,18 @@
/**
+ * g_inet_socket_address_get_scope_id:
+ * @address: a %G_SOCKET_FAMILY_IPV6 #GInetAddress
+ *
+ * Gets the sin6_scope_id field from @address,
+ * which must be an IPv6 address.
+ *
+ * Returns: the scope id field
+ * Since: 2.32
+ */
+
+
+/**
* g_inet_socket_address_new:
* @address: a #GInetAddress
* @port: a port number
@@ -29104,7 +29244,7 @@
* @first_property_name: the name of the first property, or %NULL if no properties
* @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
*
- * Helper function for constructing #GInitiable object. This is
+ * Helper function for constructing #GInitable object. This is
* similar to g_object_new() but also initializes the object
* and returns %NULL, setting an error on failure.
*
@@ -29121,7 +29261,7 @@
* @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError location to store the error occurring, or %NULL to ignore.
*
- * Helper function for constructing #GInitiable object. This is
+ * Helper function for constructing #GInitable object. This is
* similar to g_object_new_valist() but also initializes the object
* and returns %NULL, setting an error on failure.
*
@@ -29138,7 +29278,7 @@
* @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError location to store the error occurring, or %NULL to ignore.
*
- * Helper function for constructing #GInitiable object. This is
+ * Helper function for constructing #GInitable object. This is
* similar to g_object_newv() but also initializes the object
* and returns %NULL, setting an error on failure.
*
@@ -29687,7 +29827,7 @@
* Create a new scope for loading of IO modules. A scope can be used for
* blocking duplicate modules, or blocking a module you don't want to load.
*
- * Specify the %G_IO_MODULES_SCOPE_BLOCK_DUPLICATES flag to block modules
+ * Specify the %G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules
* which have the same base name as a module that has already been seen
* in this scope.
*
@@ -30421,7 +30561,7 @@
* @submenu: a #GMenuModel with the items of the submenu
*
* Convenience function for appending a submenu menu item to the end of
- * @menu. Combine g_menu_new_submenu() and g_menu_insert_item() for a
+ * @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a
* more flexible alternative.
*
* Since: 2.32
@@ -30457,8 +30597,8 @@
*
* If successful, @name and @value are set to the name and value of the
* attribute that has just been advanced to. At this point,
- * g_menu_item_get_name() and g_menu_item_get_value() will return the
- * same values again.
+ * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will
+ * return the same values again.
*
* The value returned in @name remains valid for as long as the iterator
* remains at the current position. The value returned in @value must
@@ -30586,7 +30726,7 @@
* @submenu: a #GMenuModel with the items of the submenu
*
* Convenience function for inserting a submenu menu item into @menu.
- * Combine g_menu_new_submenu() and g_menu_insert_item() for a more
+ * Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more
* flexible alternative.
*
* Since: 2.32
@@ -30848,8 +30988,7 @@
* a separator between an action name and a target string. In this
* case, this call is equivalent to calling
* g_menu_item_set_action_and_target() with the part before the "::" and
- * g_menu_item_set_target_value() with a string-type #GVariant
- * containing the part following the "::".
+ * with a string-type #GVariant containing the part following the "::".
*
* If @detailed_action doesn't contain "::" then the action is set to
* the given string (verbatim) and the target value is unset.
@@ -30858,7 +30997,7 @@
* g_menu_item_set_action_and_target_value() for more flexible (but
* slightly less convenient) alternatives.
*
- * See also g_menu_set_action_and_target_value() for a description of
+ * See also g_menu_item_set_action_and_target_value() for a description of
* the semantics of the action and target attributes.
*
* Since: 2.32
@@ -30961,7 +31100,7 @@
*
* If successful, @out_link and @value are set to the name and #GMenuModel
* of the link that has just been advanced to. At this point,
- * g_menu_item_get_name() and g_menu_item_get_value() will return the
+ * g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the
* same values again.
*
* The value returned in @out_link remains valid for as long as the iterator
@@ -31005,130 +31144,6 @@
/**
- * g_menu_markup_parser_end:
- * @context: a #GMarkupParseContext
- *
- * Stop the parsing of a set of menus and return the #GHashTable.
- *
- * The #GHashTable maps strings to #GObject instances. The parser only
- * adds #GMenu instances to the table, but it may contain other types if
- * a table was provided to g_menu_markup_parser_start().
- *
- * This call should be matched with g_menu_markup_parser_start().
- * See that function for more information
- *
- * Returns: (transfer full): the #GHashTable containing the objects
- * Since: 2.32
- */
-
-
-/**
- * g_menu_markup_parser_end_menu:
- * @context: a #GMarkupParseContext
- *
- * Stop the parsing of a menu and return the newly-created #GMenu.
- *
- * This call should be matched with g_menu_markup_parser_start_menu().
- * See that function for more information
- *
- * Returns: (transfer full): the newly-created #GMenu
- * Since: 2.32
- */
-
-
-/**
- * g_menu_markup_parser_start:
- * @context: a #GMarkupParseContext
- * @domain: (allow-none): translation domain for labels, or %NULL
- * @objects: (allow-none): a #GHashTable for the objects, or %NULL
- *
- * Begin parsing a group of menus in XML form.
- *
- * If @domain is not %NULL, it will be used to translate attributes
- * that are marked as translatable, using gettext().
- *
- * If @objects is specified then it must be a #GHashTable that was
- * created using g_hash_table_new_full() with g_str_hash(),
- * g_str_equal(), g_free() and g_object_unref().
- * Any named menus (ie: menu,
- * submenu,
- * section or link
- * elements with an id='' attribute) that are encountered while parsing
- * will be added to this table. Each toplevel menu must be named.
- *
- * If @objects is %NULL then an empty hash table will be created.
- *
- * This function should be called from the start_element function for
- * the element representing the group containing the menus. In other
- * words, the content inside of this element is expected to be a list of
- * menus.
- *
- * Since: 2.32
- */
-
-
-/**
- * g_menu_markup_parser_start_menu:
- * @context: a #GMarkupParseContext
- * @domain: (allow-none): translation domain for labels, or %NULL
- * @objects: (allow-none): a #GHashTable for the objects, or %NULL
- *
- * Begin parsing the XML definition of a menu.
- *
- * This function should be called from the start_element function for
- * the element representing the menu itself. In other words, the
- * content inside of this element is expected to be a list of items.
- *
- * If @domain is not %NULL, it will be used to translate attributes
- * that are marked as translatable, using gettext().
- *
- * If @objects is specified then it must be a #GHashTable that was
- * created using g_hash_table_new_full() with g_str_hash(),
- * g_str_equal(), g_free() and g_object_unref().
- * Any named menus (ie: submenu,
- * section or link
- * elements with an id='' attribute) that are encountered while parsing
- * will be added to this table.
- * Note that toplevel menu is not added to
- * the hash table, even if it has an id attribute.
- *
- * If @objects is %NULL then named menus will not be supported.
- *
- * You should call g_menu_markup_parser_end_menu() from the
- * corresponding end_element function in order to collect the newly
- * parsed menu.
- *
- * Since: 2.32
- */
-
-
-/**
- * g_menu_markup_print_stderr:
- * @model: a #GMenuModel
- *
- * Print @model to stderr for debugging purposes.
- *
- * This debugging function will be removed in the future.
- */
-
-
-/**
- * g_menu_markup_print_string:
- * @string: a #GString
- * @model: the #GMenuModel to print
- * @indent: the intentation level to start at
- * @tabstop: how much to indent each level
- *
- * Print the contents of @model to @string.
- * Note that you have to provide the containing
- * menu element yourself.
- *
- * Returns: @string
- * Since: 2.32
- */
-
-
-/**
* g_menu_model_get_item_attribute:
* @model: a #GMenuModel
* @item_index: the index of the item
@@ -31339,7 +31354,7 @@
* @submenu: a #GMenuModel with the items of the submenu
*
* Convenience function for prepending a submenu menu item to the start
- * of @menu. Combine g_menu_new_submenu() and g_menu_insert_item() for
+ * of @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for
* a more flexible alternative.
*
* Since: 2.32
@@ -32001,7 +32016,7 @@
* @uri. May fail and return %NULL in case parsing @uri fails.
*
* Using this rather than g_network_address_new() or
- * g_network_address_parse_host() allows #GSocketClient to determine
+ * g_network_address_parse() allows #GSocketClient to determine
* when to use application-specific proxy protocols.
*
* Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
@@ -32073,6 +32088,39 @@
/**
+ * g_network_monitor_can_reach_async:
+ * @monitor: a #GNetworkMonitor
+ * @connectable: a #GSocketConnectable
+ * @cancellable: a #GCancellable, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously attempts to determine whether or not the host
+ * pointed to by @connectable can be reached, without actually
+ * trying to connect to it.
+ *
+ * For more details, see g_network_monitor_can_reach().
+ *
+ * When the operation is finished, @callback will be called.
+ * You can then call g_network_monitor_can_reach_finish()
+ * to get the result of the operation.
+ */
+
+
+/**
+ * g_network_monitor_can_reach_finish:
+ * @monitor: a #GNetworkMonitor
+ * @result: a #GAsyncResult
+ * @error: return location for errors, or %NULL
+ *
+ * Finishes an async network connectivity test.
+ * See g_network_monitor_can_reach_async().
+ *
+ * Returns: %TRUE if network is reachable, %FALSE if not.
+ */
+
+
+/**
* g_network_monitor_get_default:
*
* Gets the default #GNetworkMonitor for the system.
@@ -32263,6 +32311,18 @@
/**
+ * g_node_insert_data_after:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode after
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode after the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
* g_node_insert_data_before:
* @parent: the #GNode to place the new #GNode under
* @sibling: the sibling #GNode to place the new #GNode before
@@ -33283,6 +33343,27 @@
/**
* g_remote_action_group_activate_action_full:
+ * @remote: a #GDBusActionGroup
+ * @action_name: the name of the action to activate
+ * @parameter: (allow none): the optional parameter to the activation
+ * @platform_data: the platform data to send
+ *
+ * Activates the remote action.
+ *
+ * This is the same as g_action_group_activate_action() except that it
+ * allows for provision of "platform data" to be sent along with the
+ * activation request. This typically contains details such as the user
+ * interaction timestamp or startup notification information.
+ *
+ * @platform_data must be non-%NULL and must have the type
+ * %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_remote_action_group_change_action_state_full:
* @remote: a #GRemoteActionGroup
* @action_name: the name of the action to change the state of
* @value: the new requested value for the state
@@ -34210,6 +34291,31 @@
/**
+ * g_settings_create_action:
+ * @settings: a #GSettings
+ * @key: the name of a key in @settings
+ *
+ * Creates a #GAction corresponding to a given #GSettings key.
+ *
+ * The action has the same name as the key.
+ *
+ * The value of the key becomes the state of the action and the action
+ * is enabled when the key is writable. Changing the state of the
+ * action results in the key being written to. Changes to the value or
+ * writability of the key cause appropriate change notifications to be
+ * emitted for the action.
+ *
+ * For boolean-valued keys, action activations take no parameter and
+ * result in the toggling of the value. For all other types,
+ * activations take the new value for the key (which must have the
+ * correct type).
+ *
+ * Returns: (transfer full): a new #GAction
+ * Since: 2.32
+ */
+
+
+/**
* g_settings_delay:
* @settings: a #GSettings object
*
@@ -35237,6 +35343,18 @@
/**
+ * g_signal_handlers_disconnect_by_data:
+ * @instance: The instance to remove handlers from
+ * @data: the closure data of the handlers' closures
+ *
+ * Disconnects all handlers on an instance that match @data.
+ *
+ * Returns: The number of handlers that matched.
+ * Since: 2.32
+ */
+
+
+/**
* g_signal_handlers_disconnect_by_func:
* @instance: The instance to remove handlers from.
* @func: The C closure callback of the handlers (useless for non-C closures).
@@ -36506,6 +36624,36 @@
/**
+ * g_socket_condition_timed_wait:
+ * @socket: a #GSocket
+ * @condition: a #GIOCondition mask to wait for
+ * @timeout: the maximum time (in microseconds) to wait, or -1
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a #GError pointer, or %NULL
+ *
+ * Waits for up to @timeout microseconds for @condition to become true
+ * on @socket. If the condition is met, %TRUE is returned.
+ *
+ * If @cancellable is cancelled before the condition is met, or if
+ * @timeout (or the socket's #GSocket:timeout) is reached before the
+ * condition is met, then %FALSE is returned and @error, if non-%NULL,
+ * is set to the appropriate value (%G_IO_ERROR_CANCELLED or
+ * %G_IO_ERROR_TIMED_OUT).
+ *
+ * If you don't want a timeout, use g_socket_condition_wait().
+ * (Alternatively, you can pass -1 for @timeout.)
+ *
+ * Note that although @timeout is in microseconds for consistency with
+ * other GLib APIs, this function actually only has millisecond
+ * resolution, and the behavior is undefined if @timeout is not an
+ * exact number of milliseconds.
+ *
+ * Returns: %TRUE if the condition was met, %FALSE otherwise
+ * Since: 2.32
+ */
+
+
+/**
* g_socket_condition_wait:
* @socket: a #GSocket
* @condition: a #GIOCondition mask to wait for
@@ -36521,6 +36669,8 @@
* the appropriate value (%G_IO_ERROR_CANCELLED or
* %G_IO_ERROR_TIMED_OUT).
*
+ * See also g_socket_condition_timed_wait().
+ *
* Returns: %TRUE if the condition was met, %FALSE otherwise
* Since: 2.22
*/
@@ -37072,7 +37222,7 @@
* g_socket_join_multicast_group:
* @socket: a #GSocket.
* @group: a #GInetAddress specifying the group address to join.
- * @iface: Interface to use
+ * @iface: (allow-none): Name of the interface to use, or %NULL
* @source_specific: %TRUE if source-specific multicast should be used
* @error: #GError for error reporting, or %NULL to ignore.
*
@@ -37081,8 +37231,12 @@
* been bound to an appropriate interface and port with
* g_socket_bind().
*
+ * If @iface is %NULL, the system will automatically pick an interface
+ * to bind to based on @group.
+ *
* If @source_specific is %TRUE, source-specific multicast as defined
- * in RFC 4604 is used.
+ * in RFC 4604 is used. Note that on older platforms this may fail
+ * with a %G_IO_ERROR_NOT_SUPPORTED error.
*
* Returns: %TRUE on success, %FALSE on error.
* Since: 2.32
@@ -37093,15 +37247,16 @@
* g_socket_leave_multicast_group:
* @socket: a #GSocket.
* @group: a #GInetAddress specifying the group address to leave.
- * @iface: Interface to use
- * @source_specific: %TRUE if source-specific multicast should be used
+ * @iface: (allow-none): Interface used
+ * @source_specific: %TRUE if source-specific multicast was used
* @error: #GError for error reporting, or %NULL to ignore.
*
- * Removes @socket from the multicast group @group (while still
- * allowing it to receive unicast messages).
+ * Removes @socket from the multicast group defined by @group, @iface,
+ * and @source_specific (which must all have the same values they had
+ * when you joined the group).
*
- * If @source_specific is %TRUE, source-specific multicast as defined
- * in RFC 4604 is used.
+ * @socket remains bound to its address and port, and can still receive
+ * unicast messages after calling this.
*
* Returns: %TRUE on success, %FALSE on error.
* Since: 2.32
@@ -37786,7 +37941,7 @@
/**
* g_socket_set_broadcast:
* @socket: a #GSocket.
- * @loopback: whether @socket should allow sending to and receiving from broadcast addresses
+ * @broadcast: whether @socket should allow sending to and receiving from broadcast addresses
*
* Sets whether @socket should allow sending to and receiving from
* broadcast addresses. This is %FALSE by default.
@@ -38051,6 +38206,50 @@
/**
+ * g_static_resource_fini:
+ * @static_resource: pointer to a static #GStaticResource.
+ *
+ * Finalized a GResource initialized by g_static_resource_init ().
+ *
+ * This is normally used by code generated by
+ * glib-compile-resources and is
+ * not typically used by other code.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_static_resource_get_resource:
+ * @static_resource: pointer to a static #GStaticResource.
+ *
+ * Gets the GResource that was registred by a call to g_static_resource_init ().
+ *
+ * This is normally used by code generated by
+ * glib-compile-resources and is
+ * not typically used by other code.
+ *
+ * Returns: (transfer none): a #GResource.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_static_resource_init:
+ * @static_resource: pointer to a static #GStaticResource.
+ *
+ * Initializes a GResource from static data using a
+ * GStaticResource.
+ *
+ * This is normally used by code generated by
+ * glib-compile-resources and is
+ * not typically used by other code.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* g_tcp_connection_get_graceful_disconnect:
* @connection: a #GTcpConnection
*
@@ -38253,7 +38452,7 @@
* g_tls_backend_get_file_database_type:
* @backend: the #GTlsBackend
*
- * Gets the #GTyep of @backend's #GTlsFileDatabase implementation.
+ * Gets the #GType of @backend's #GTlsFileDatabase implementation.
*
* Returns: the #GType of backend's #GTlsFileDatabase implementation.
* Since: 2.30
@@ -38875,9 +39074,10 @@
*
* Lookup a certificate by its handle.
*
- * The handle should have been created by calling g_tls_database_create_handle()
- * on a #GTlsDatabase object of the same TLS backend. The handle is designed
- * to remain valid across instantiations of the database.
+ * The handle should have been created by calling
+ * g_tls_database_create_certificate_handle() on a #GTlsDatabase object of
+ * the same TLS backend. The handle is designed to remain valid across
+ * instantiations of the database.
*
* If the handle is no longer valid, or does not point to a certificate in
* this database, then %NULL will be returned.
@@ -38903,7 +39103,7 @@
* @user_data: the data to pass to the callback function
*
* Asynchronously lookup a certificate by its handle in the database. See
- * g_tls_database_lookup_handle() for more information.
+ * g_tls_database_lookup_certificate_for_handle() for more information.
*
* Since: 2.30
*/
@@ -38916,7 +39116,7 @@
* @error: a #GError pointer, or %NULL
*
* Finish an asynchronous lookup of a certificate by its handle. See
- * g_tls_database_lookup_handle() for more information.
+ * g_tls_database_lookup_certificate_handle() for more information.
*
* If the handle is no longer valid, or does not point to a certificate in
* this database, then %NULL will be returned.
@@ -39283,10 +39483,13 @@
* @password: a #GTlsPassword object
* @length: (allow-none): location to place the length of the password.
*
- * Get the password value. If @length is not %NULL then it will be filled
- * in with the length of the password value.
+ * Get the password value. If @length is not %NULL then it will be
+ * filled in with the length of the password value. (Note that the
+ * password value is not nul-terminated, so you can only pass %NULL
+ * for @length in contexts where you know the password will have a
+ * certain fixed length.)
*
- * Returns: The password value owned by the password object.
+ * Returns: The password value (owned by the password object).
* Since: 2.30
*/
@@ -39346,9 +39549,10 @@
* Set the value for this password. The @value will be copied by the password
* object.
*
- * Specify the @length, for a non-null-terminated password. Pass -1 as
- * @length if using a null-terminated password, and @length will be calculated
- * automatically.
+ * Specify the @length, for a non-nul-terminated password. Pass -1 as
+ * @length if using a nul-terminated password, and @length will be
+ * calculated automatically. (Note that the terminating nul is not
+ * considered part of the password in this case.)
*
* Since: 2.30
*/
@@ -39366,9 +39570,10 @@
* The @value will be owned by the password object, and later freed using
* the @destroy function callback.
*
- * Specify the @length, for a non-null-terminated password. Pass -1 as
- * @length if using a null-terminated password, and @length will be calculated
- * automatically.
+ * Specify the @length, for a non-nul-terminated password. Pass -1 as
+ * @length if using a nul-terminated password, and @length will be
+ * calculated automatically. (Note that the terminating nul is not
+ * considered part of the password in this case.)
*
* Virtual: set_value
* Since: 2.30
@@ -39973,7 +40178,7 @@
/**
* g_unix_mount_free:
- * @mount_entry: a #GUnixMount.
+ * @mount_entry: a #GUnixMountEntry.
*
* Frees a unix mount.
*/
@@ -40634,7 +40839,7 @@
* @volume: a #GVolume
*
* Gets the kinds of identifiers
- * that @volume has. Use g_volume_get_identifer() to obtain
+ * that @volume has. Use g_volume_get_identifier() to obtain
* the identifiers themselves.
*
* of strings containing kinds of identifiers. Use g_strfreev() to free.
@@ -40988,9 +41193,9 @@
/**
* g_win32_input_stream_new:
* @handle: a Win32 file handle
- * @close_fd: %TRUE to close the handle when done
+ * @close_handle: %TRUE to close the handle when done
*
- * Creates a new #GWin32InputStream for the given @fd.
+ * Creates a new #GWin32InputStream for the given @handle.
*
* If @close_handle is %TRUE, the handle will be closed
* when the stream is closed.
diff -Nru gobject-introspection-1.31.10/gir/glib-2.0.c gobject-introspection-1.31.20/gir/glib-2.0.c
--- gobject-introspection-1.31.10/gir/glib-2.0.c 2012-01-19 22:06:34.000000000 +0000
+++ gobject-introspection-1.31.20/gir/glib-2.0.c 2012-03-05 14:44:03.000000000 +0000
@@ -972,11 +972,24 @@
* g_direct_hash() is also the appropriate hash function for keys
* of the form GINT_TO_POINTER (n) (or similar macros).
*
- * The hash values should be evenly
- * distributed over a fairly large range? The modulus is taken with the
- * hash table size (a prime number) to find the 'bucket' to place each
- * key into. The function should also be very fast, since it is called
- * for each key lookup.
+ * A good hash functions should produce
+ * hash values that are evenly distributed over a fairly large range.
+ * The modulus is taken with the hash table size (a prime number) to
+ * find the 'bucket' to place each key into. The function should also
+ * be very fast, since it is called for each key lookup.
+ *
+ * Note that the hash functions provided by GLib have these qualities,
+ * but are not particularly robust against manufactured keys that
+ * cause hash collisions. Therefore, you should consider choosing
+ * a more secure hash function when using a GHashTable with keys
+ * that originate in untrusted data (such as HTTP requests).
+ * Using g_str_hash() in that situation might make your application
+ * vulerable to Algorithmic Complexity Attacks.
+ *
+ * The key to choosing a good hash is unpredictability. Even
+ * cryptographic hashes are very easy to find collisions for when the
+ * remainder is taken modulo a somewhat predictable prime number. There
+ * must be an element of randomness that an attacker is unable to guess.
*
* Returns: the hash value corresponding to the key
*/
@@ -1537,6 +1550,15 @@
/**
+ * GLIB_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * A macro that should be defined before including the glib.h header.
+ * If it is defined, no compiler warnings will be produced for uses
+ * of deprecated GLib APIs.
+ */
+
+
+/**
* GLIB_MAJOR_VERSION:
*
* The major version number of the GLib library.
@@ -1570,6 +1592,82 @@
/**
+ * GLIB_VERSION_2_26:
+ *
+ * A macro that evaluates to the 2.26 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_28:
+ *
+ * A macro that evaluates to the 2.28 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_30:
+ *
+ * A macro that evaluates to the 2.30 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_32:
+ *
+ * A macro that evaluates to the 2.32 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MAX_ALLOWED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the upper bound for the GLib API to use.
+ *
+ * If a function has been introduced in a newer version of GLib,
+ * it is possible to use this symbol to get compiler warnings when
+ * trying to use that function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the lower bound for the GLib API to use.
+ *
+ * If a function has been deprecated in a newer version of GLib,
+ * it is possible to use this symbol to avoid the compiler warnings
+ * without disabling warning for every deprecated function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* GLONG_FROM_BE:
* @val: a #glong value in big-endian byte order
*
@@ -3062,6 +3160,15 @@
/**
+ * GSignalCVaMarshaller:
+ *
+ * This is the signature of va_list marshaller functions, an optional
+ * marshaller that can be used in some situations to avoid
+ * marshalling the signal argument into GValues.
+ */
+
+
+/**
* GSignalEmissionHook:
* @ihint: Signal invocation hint, see #GSignalInvocationHint.
* @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
@@ -3251,7 +3358,8 @@
* @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
* @G_SPAWN_ERROR_ACCES: execv() returned EACCES
* @G_SPAWN_ERROR_PERM: execv() returned EPERM
- * @G_SPAWN_ERROR_2BIG: execv() returned E2BIG
+ * @G_SPAWN_ERROR_TOO_BIG: execv() returned E2BIG
+ * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG
* @G_SPAWN_ERROR_NOEXEC: execv() returned ENOEXEC
* @G_SPAWN_ERROR_NAMETOOLONG: execv() returned ENAMETOOLONG
* @G_SPAWN_ERROR_NOENT: execv() returned ENOENT
@@ -3546,8 +3654,13 @@
* @G_TOKEN_EOF: the end of the file
* @G_TOKEN_LEFT_PAREN: a '(' character
* @G_TOKEN_LEFT_CURLY: a '{' character
+ * @G_TOKEN_LEFT_BRACE: a '[' character
* @G_TOKEN_RIGHT_CURLY: a '}' character
* @G_TOKEN_RIGHT_PAREN: a ')' character
+ * @G_TOKEN_RIGHT_BRACE: a ']' character
+ * @G_TOKEN_EQUAL_SIGN: a '=' character
+ * @G_TOKEN_COMMA: a ',' character
+ * @G_TOKEN_NONE: not a token
* @G_TOKEN_ERROR: an error occurred
* @G_TOKEN_CHAR: a character
* @G_TOKEN_BINARY: a binary integer
@@ -4222,6 +4335,8 @@
* @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
* @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
* @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
+ * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32
+ * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32
*
* These are the possible line break classifications.
*
@@ -4322,6 +4437,13 @@
* @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
* @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
* @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
+ * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, Meroitic Hieroglyphs. Since: 2.32
+ * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32
+ * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32
+ * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32
+ * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32
*
* The #GUnicodeScript enumeration identifies different writing
* systems. The values correspond to the names as defined in the
@@ -5074,6 +5196,30 @@
/**
+ * G_DEPRECATED:
+ *
+ * This macro is similar to %G_GNUC_DEPRECATED, and can be used to mark
+ * functions declarations as deprecated. Unlike %G_GNUC_DEPRECATED, it is
+ * meant to be portable across different compilers and must be placed
+ * before the function declaration.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_DEPRECATED_FOR:
+ *
+ * This macro is similar to %G_GNUC_DEPRECATED_FOR, and can be used to mark
+ * functions declarations as deprecated. Unlike %G_GNUC_DEPRECATED_FOR, it is
+ * meant to be portable across different compilers and must be placed
+ * before the function declaration.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* G_DIR_SEPARATOR:
*
* The directory separator character.
@@ -5320,6 +5466,27 @@
/**
+ * G_GNUC_BEGIN_IGNORE_DEPRECATIONS:
+ *
+ * Tells gcc (if it is a new enough version) to
+ * temporarily stop emitting warnings when functions marked with
+ * %G_GNUC_DEPRECATED or %G_GNUC_DEPRECATED_FOR are called. This is
+ * useful for when you have one deprecated function calling another
+ * one, or when you still have regression tests for deprecated
+ * functions.
+ *
+ * Use %G_GNUC_END_IGNORE_DEPRECATIONS to begin warning again. (If you
+ * are not compiling with -Wdeprecated-declarations
+ * then neither macro has any effect.)
+ *
+ * This macro can be used either inside or outside of a function body,
+ * but must appear on a line by itself.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* G_GNUC_CONST:
*
* Expands to the GNU C const function attribute if
@@ -5369,6 +5536,20 @@
/**
+ * G_GNUC_END_IGNORE_DEPRECATIONS:
+ *
+ * Undoes the effect of %G_GNUC_BEGIN_IGNORE_DEPRECATIONS, telling
+ * gcc to begin outputting warnings again
+ * (assuming those warnings had been enabled to begin with).
+ *
+ * This macro can be used either inside or outside of a function body,
+ * but must appear on a line by itself.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* G_GNUC_EXTENSION:
*
* Expands to __extension__ when gcc
@@ -6177,6 +6358,7 @@
* Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
*
* Returns: %TRUE on success.
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -7258,6 +7440,8 @@
* @pspec: a valid #GParamSpec instance
*
* Cast a #GParamSpec instance into a #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -8603,6 +8787,8 @@
* G_TYPE_PARAM_VALUE_ARRAY:
*
* The #GType of #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -8766,6 +8952,8 @@
*
* The type ID of the "GValueArray" type which is a boxed type,
* used to pass around pointers to GValueArrays.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -8807,6 +8995,17 @@
/**
+ * G_UNAVAILABLE:
+ *
+ * This macro can be used to mark a function declaration as unavailable.
+ * It must be placed before the function declaration. Use of a function
+ * that has been annotated with this macros will produce a compiler warning.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* G_UNICHAR_MAX_DECOMPOSITION_LENGTH:
*
* The maximum length (in codepoints) of a compatibility or canonical
@@ -9778,7 +9977,7 @@
* available in the queue at that point, the thread is now put to sleep
* until a message arrives. The message will be removed from the queue
* and returned. The functions g_async_queue_try_pop() and
- * g_async_queue_timed_pop() can be used to only check for the presence
+ * g_async_queue_timeout_pop() can be used to only check for the presence
* of messages or to only wait a certain time for messages respectively.
*
* For almost every function there exist two variants, one that locks
@@ -12750,8 +12949,9 @@
* g_node_insert_before(), g_node_append() and g_node_prepend().
*
* To create a new node and insert it into a tree use
- * g_node_insert_data(), g_node_insert_data_before(),
- * g_node_append_data() and g_node_prepend_data().
+ * g_node_insert_data(), g_node_insert_data_after(),
+ * g_node_insert_data_before(), g_node_append_data()
+ * and g_node_prepend_data().
*
* To reverse the children of a node use g_node_reverse_children().
*
@@ -12873,6 +13073,18 @@
* GLib provides version information, primarily useful in configure
* checks for builds that have a configure script. Applications will
* not typically use the features described here.
+ *
+ * The GLib headers annotate deprecated APIs in a way that produces
+ * compiler warnings if these deprecated APIs are used. The warnings
+ * can be turned off by defining the macro %GLIB_DISABLE_DEPRECATION_WARNINGS
+ * before including the glib.h header.
+ *
+ * GLib also provides support for building applications against
+ * defined subsets of deprecated or new GLib APIs. Define the macro
+ * %GLIB_VERSION_MIN_REQUIRED to specify up to what version of GLib
+ * you want to receive warnings about deprecated APIs. Define the
+ * macro %GLIB_VERSION_MAX_ALLOWED to specify the newest version of
+ * GLib whose API you want to use.
*/
@@ -13201,6 +13413,25 @@
/**
+ * g_array_set_clear_func:
+ * @array: A #GArray
+ * @clear_func: a function to clear an element of @array
+ *
+ * Sets a function to clear an element of @array.
+ *
+ * The @clear_func will be called when an element in the array
+ * data segment is removed and when the array is freed and data
+ * segment is deallocated as well.
+ *
+ * Note that in contrast with other uses of #GDestroyNotify
+ * functions, @clear_func is expected to clear the contents of
+ * the array element it is given, but not free the element itself.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* g_array_set_size:
* @array: a #GArray.
* @length: the new size of the #GArray.
@@ -14150,6 +14381,7 @@
* received before @end_time.
*
* Returns: data from the queue or %NULL, when no data is
+ * Deprecated: use g_async_queue_timeout_pop().
*/
@@ -14171,6 +14403,41 @@
* received before @end_time.
*
* Returns: data from the queue or %NULL, when no data is
+ * Deprecated: use g_async_queue_timeout_pop_unlocked().
+ */
+
+
+/**
+ * g_async_queue_timeout_pop:
+ * @queue: a #GAsyncQueue
+ * @timeout: the number of microseconds to wait
+ *
+ * Pops data from the @queue. If the queue is empty, blocks for
+ * @timeout microseconds, or until data becomes available.
+ *
+ * If no data is received before the timeout, %NULL is returned.
+ *
+ * received before the timeout.
+ *
+ * Returns: data from the queue or %NULL, when no data is
+ */
+
+
+/**
+ * g_async_queue_timeout_pop_unlocked:
+ * @queue: a #GAsyncQueue
+ * @timeout: the number of microseconds to wait
+ *
+ * Pops data from the @queue. If the queue is empty, blocks for
+ * @timeout microseconds, or until data becomes available.
+ *
+ * If no data is received before the timeout, %NULL is returned.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * received before the timeout.
+ *
+ * Returns: data from the queue or %NULL, when no data is
*/
@@ -15191,7 +15458,7 @@
* @full_path. If the file could not be loaded then an %error is
* set to either a #GFileError or #GBookmarkFileError.
*
- * Returns: %TRUE if a key file could be loaded, %FALSE othewise
+ * Returns: %TRUE if a key file could be loaded, %FALSE otherwise
* Since: 2.12
*/
@@ -16485,7 +16752,7 @@
* Notice that the end time is calculated once, before entering the
* loop and reused. This is the motivation behind the use of absolute
* time on this API -- if a relative time of 5 seconds were passed
- * directly to the call and a spurious wakeup occured, the program would
+ * directly to the call and a spurious wakeup occurred, the program would
* have to start over waiting again (which would lead to a total wait
* time of more than 5 seconds).
*
@@ -16657,7 +16924,7 @@
* @key: the string identifying a data element.
* @Returns: the data element, or %NULL if it is not found.
*
- * Gets a data element, using its string identifer. This is slower than
+ * Gets a data element, using its string identifier. This is slower than
* g_datalist_id_get_data() because it compares strings.
*/
@@ -17004,7 +17271,7 @@
* @lhs: first date to compare
* @rhs: second date to compare
*
- * qsort()-style comparsion function for dates.
+ * qsort()-style comparison function for dates.
* Both dates must be valid.
*
* greater than zero if @lhs is greater than @rhs
@@ -18885,7 +19152,7 @@
/**
* g_environ_setenv:
- * @envp: (array zero-terminated=1) (transfer full): an environment list (eg, as returned from g_get_environ())
+ * @envp: (array zero-terminated=1) (transfer full): an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ())
* @variable: the environment variable to set, must not contain '='
* @value: the value for to set the variable to
* @overwrite: whether to change the variable if it already exists
@@ -18897,7 +19164,7 @@
* file name encoding. On UNIX, this means that they can be
* arbitrary byte strings. On Windows, they should be in UTF-8.
*
- * updated environment
+ * updated environment list. Free it using g_strfreev().
*
* Returns: (array zero-terminated=1) (transfer full): the
* Since: 2.32
@@ -18906,13 +19173,13 @@
/**
* g_environ_unsetenv:
- * @envp: (array zero-terminated=1) (transfer full): an environment list (eg, as returned from g_get_environ())
+ * @envp: (array zero-terminated=1) (transfer full): an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ())
* @variable: the environment variable to remove, must not contain '='
*
* Removes the environment variable @variable from the provided
* environment @envp.
*
- * updated environment
+ * updated environment list. Free it using g_strfreev().
*
* Returns: (array zero-terminated=1) (transfer full): the
* Since: 2.32
@@ -19712,8 +19979,8 @@
* On Windows, "limitations of the OS kernel" is a rather substantial
* statement. Depending on the configuration of the system, the wall
* clock time is updated as infrequently as 64 times a second (which
- * is approximately every 16ms). Also, the on XP (not on Vista or later)
- * the monitonic clock is locally monotonic, but may differ in exact
+ * is approximately every 16ms). Also, on XP (but not on Vista or later)
+ * the monotonic clock is locally monotonic, but may differ in exact
* value between processes due to timer wrap handling.
*
* Returns: the monotonic time, in microseconds
@@ -22221,8 +22488,8 @@
/**
* g_key_file_load_from_data:
* @key_file: an empty #GKeyFile struct
- * @data: (array length=length): key file loaded in memory
- * @length: the length of @data in bytes
+ * @data: key file loaded in memory
+ * @length: the length of @data in bytes (or -1 if data is nul-terminated)
* @flags: flags from #GKeyFileFlags
* @error: return location for a #GError, or %NULL
*
@@ -22281,7 +22548,7 @@
* @error: return location for a #GError, or %NULL
*
* Loads a key file into an empty #GKeyFile structure.
- * If the file could not be loaded then %error is set to
+ * If the file could not be loaded then @error is set to
* either a #GFileError or #GKeyFileError.
*
* Returns: %TRUE if a key file could be loaded, %FALSE otherwise
@@ -24153,7 +24420,7 @@
* with g_mapped_file_unref(), or %NULL if the mapping failed.
*
* Returns: a newly allocated #GMappedFile which must be unref'd
- * Since: 2.30
+ * Since: 2.32
*/
@@ -25467,6 +25734,18 @@
/**
+ * g_node_insert_data_after:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode after
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode after the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
* g_node_insert_data_before:
* @parent: the #GNode to place the new #GNode under
* @sibling: the sibling #GNode to place the new #GNode before
@@ -29262,6 +29541,14 @@
* the first item comes before the second, and a positive value if
* the second item comes before the first.
*
+ *
+ * This function will fail if the data contained in the sequence is
+ * unsorted. Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ *
+ *
* first item found equal to @data according to @cmp_func and @cmp_data.
*
* Returns: an #GSequenceIter pointing to the position of the
@@ -29284,6 +29571,14 @@
* if the first iterator comes before the second, and a positive
* value if the second iterator comes before the first.
*
+ *
+ * This function will fail if the data contained in the sequence is
+ * unsorted. Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ *
+ *
* the first item found equal to @data according to @cmp_func
* and @cmp_data.
*
@@ -29376,7 +29671,7 @@
* Removes the item pointed to by @iter. It is an error to pass the
* end iterator to this function.
*
- * If the sequnce has a data destroy function associated with it, this
+ * If the sequence has a data destroy function associated with it, this
* function is called on the data for the removed item.
*
* Since: 2.14
@@ -29415,6 +29710,14 @@
* If you are simply searching for an existing element of the sequence,
* consider using g_sequence_lookup().
*
+ *
+ * This function will fail if the data contained in the sequence is
+ * unsorted. Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ *
+ *
* would have been inserted according to @cmp_func and @cmp_data.
*
* Returns: an #GSequenceIter pointing to the position where @data
@@ -29440,6 +29743,14 @@
* If you are simply searching for an existing element of the sequence,
* consider using g_sequence_lookup_iter().
*
+ *
+ * This function will fail if the data contained in the sequence is
+ * unsorted. Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ *
+ *
* where @data would have been inserted according to @iter_cmp
* and @cmp_data.
*
@@ -29799,6 +30110,18 @@
/**
+ * g_signal_handlers_disconnect_by_data:
+ * @instance: The instance to remove handlers from
+ * @data: the closure data of the handlers' closures
+ *
+ * Disconnects all handlers on an instance that match @data.
+ *
+ * Returns: The number of handlers that matched.
+ * Since: 2.32
+ */
+
+
+/**
* g_signal_handlers_disconnect_by_func:
* @instance: The instance to remove handlers from.
* @func: The C closure callback of the handlers (useless for non-C closures).
@@ -30623,7 +30946,7 @@
* self->idle_id = 0;
* GDK_THREADS_LEAVE ();
*
- * return FALSE;
+ * return G_SOURCE_REMOVE;
* }
*
* static void
@@ -35401,9 +35724,9 @@
/**
* g_uri_unescape_segment:
- * @escaped_string: a string.
- * @escaped_string_end: a string.
- * @illegal_characters: an optional string of illegal characters not to be allowed.
+ * @escaped_string: (allow-none): A string, may be %NULL
+ * @escaped_string_end: (allow-none): Pointer to end of @escaped_string, may be %NULL
+ * @illegal_characters: (allow-none): An optional string of illegal characters not to be allowed, may be %NULL
*
* Unescapes a segment of an escaped string.
*
@@ -35413,7 +35736,9 @@
* slash being expanded in an escaped path element, which might confuse pathname
* handling.
*
- * The returned string should be freed when no longer needed.
+ * The returned string should be freed when no longer needed. As a
+ * special case if %NULL is given for @escaped_string, this function
+ * will return %NULL.
*
* Returns: an unescaped version of @escaped_string or %NULL on error.
* Since: 2.16
@@ -39219,7 +39544,7 @@
* This is an internal function and should only be used by
* the internals of glib (such as libgio).
*
- * Returns: the transation of @str to the current locale
+ * Returns: the translation of @str to the current locale
*/
diff -Nru gobject-introspection-1.31.10/gir/gobject-2.0.c gobject-introspection-1.31.20/gir/gobject-2.0.c
--- gobject-introspection-1.31.10/gir/gobject-2.0.c 2012-01-11 20:57:58.000000000 +0000
+++ gobject-introspection-1.31.20/gir/gobject-2.0.c 2012-03-05 14:44:04.000000000 +0000
@@ -607,6 +607,82 @@
/**
+ * GLIB_VERSION_2_26:
+ *
+ * A macro that evaluates to the 2.26 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_28:
+ *
+ * A macro that evaluates to the 2.28 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_30:
+ *
+ * A macro that evaluates to the 2.30 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_32:
+ *
+ * A macro that evaluates to the 2.32 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MAX_ALLOWED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the upper bound for the GLib API to use.
+ *
+ * If a function has been introduced in a newer version of GLib,
+ * it is possible to use this symbol to get compiler warnings when
+ * trying to use that function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the lower bound for the GLib API to use.
+ *
+ * If a function has been deprecated in a newer version of GLib,
+ * it is possible to use this symbol to avoid the compiler warnings
+ * without disabling warning for every deprecated function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
* GMainContext:
*
* The GMainContext struct is an opaque data
@@ -1494,6 +1570,15 @@
/**
+ * GSignalCVaMarshaller:
+ *
+ * This is the signature of va_list marshaller functions, an optional
+ * marshaller that can be used in some situations to avoid
+ * marshalling the signal argument into GValues.
+ */
+
+
+/**
* GSignalEmissionHook:
* @ihint: Signal invocation hint, see #GSignalInvocationHint.
* @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
@@ -1683,7 +1768,8 @@
* @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
* @G_SPAWN_ERROR_ACCES: execv() returned EACCES
* @G_SPAWN_ERROR_PERM: execv() returned EPERM
- * @G_SPAWN_ERROR_2BIG: execv() returned E2BIG
+ * @G_SPAWN_ERROR_TOO_BIG: execv() returned E2BIG
+ * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG
* @G_SPAWN_ERROR_NOEXEC: execv() returned ENOEXEC
* @G_SPAWN_ERROR_NAMETOOLONG: execv() returned ENAMETOOLONG
* @G_SPAWN_ERROR_NOENT: execv() returned ENOENT
@@ -2079,6 +2165,8 @@
* @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
* @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
* @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
+ * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32
+ * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32
*
* These are the possible line break classifications.
*
@@ -2179,6 +2267,13 @@
* @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
* @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
* @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
+ * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, Meroitic Hieroglyphs. Since: 2.32
+ * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32
+ * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32
+ * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32
+ * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32
*
* The #GUnicodeScript enumeration identifies different writing
* systems. The values correspond to the names as defined in the
@@ -3145,6 +3240,7 @@
* Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
*
* Returns: %TRUE on success.
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -3544,6 +3640,8 @@
* @pspec: a valid #GParamSpec instance
*
* Cast a #GParamSpec instance into a #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -4590,6 +4688,8 @@
* G_TYPE_PARAM_VALUE_ARRAY:
*
* The #GType of #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -4753,6 +4853,8 @@
*
* The type ID of the "GValueArray" type which is a boxed type,
* used to pass around pointers to GValueArrays.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
@@ -5984,6 +6086,23 @@
* object property that holds an array of values. A #GValueArray wraps
* an array of #GValue elements in order for it to be used as a boxed
* type through %G_TYPE_VALUE_ARRAY.
+ *
+ * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It
+ * is possible to create a #GArray that behaves like a #GValueArray by
+ * using the size of #GValue as the element size, and by setting
+ * g_value_unset() as the clear function using g_array_set_clear_func(),
+ * for instance, the following code:
+ *
+ * |[
+ * GValueArray *array = g_value_array_new (10);
+ * ]|
+ *
+ * can be replaced by:
+ *
+ * |[
+ * GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
+ * g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
+ * ]|
*/
@@ -7142,6 +7261,18 @@
/**
+ * g_node_insert_data_after:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode after
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode after the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
* g_node_insert_data_before:
* @parent: the #GNode to place the new #GNode under
* @sibling: the sibling #GNode to place the new #GNode before
@@ -9347,6 +9478,18 @@
/**
+ * g_signal_handlers_disconnect_by_data:
+ * @instance: The instance to remove handlers from
+ * @data: the closure data of the handlers' closures
+ *
+ * Disconnects all handlers on an instance that match @data.
+ *
+ * Returns: The number of handlers that matched.
+ * Since: 2.32
+ */
+
+
+/**
* g_signal_handlers_disconnect_by_func:
* @instance: The instance to remove handlers from.
* @func: The C closure callback of the handlers (useless for non-C closures).
@@ -9926,6 +10069,8 @@
* MyObject defined in the standard GObject
* fashion.
* type's class_init() function.
+ * Note the use of a structure member "priv" to avoid the overhead
+ * of repeatedly calling MY_OBJECT_GET_PRIVATE().
*
* |[
* typedef struct _MyObject MyObject;
@@ -9958,7 +10103,11 @@
* static int
* my_object_get_some_field (MyObject *my_object)
* {
- * MyObjectPrivate *priv = my_object->priv;
+ * MyObjectPrivate *priv;
+ *
+ * g_return_val_if_fail (MY_IS_OBJECT (my_object), 0);
+ *
+ * priv = my_object->priv;
*
* return priv->some_field;
* }
@@ -10603,10 +10752,11 @@
* @flags: Bitwise combination of #GTypeFlags values.
*
* Registers @type_id as the predefined identifier and @type_name as the
- * name of a fundamental type. The type system uses the information
- * contained in the #GTypeInfo structure pointed to by @info and the
- * #GTypeFundamentalInfo structure pointed to by @finfo to manage the
- * type and its instances. The value of @flags determines additional
+ * name of a fundamental type. If @type_id is already registered, or a type
+ * named @type_name is already registered, the behaviour is undefined. The type
+ * system uses the information contained in the #GTypeInfo structure pointed to
+ * by @info and the #GTypeFundamentalInfo structure pointed to by @finfo to
+ * manage the type and its instances. The value of @flags determines additional
* characteristics of the fundamental type.
*
* Returns: The predefined type identifier.
@@ -10720,6 +10870,7 @@
* %NULL, an uninitialized value is appended.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_append_val() instead.
*/
@@ -10731,6 +10882,7 @@
* contents.
*
* Returns: (transfer full): Newly allocated copy of #GValueArray
+ * Deprecated: 2.32: Use #GArray and g_array_ref() instead.
*/
@@ -10739,6 +10891,8 @@
* @value_array: #GValueArray to free
*
* Free a #GValueArray including its contents.
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_unref() instead.
*/
@@ -10750,6 +10904,7 @@
* Return a pointer to the value at @index_ containd in @value_array.
*
* Returns: (transfer none): pointer to a value at @index_ in @value_array
+ * Deprecated: 2.32: Use g_array_index() instead.
*/
@@ -10763,6 +10918,7 @@
* is %NULL, an uninitialized value is inserted.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_insert_val() instead.
*/
@@ -10775,6 +10931,7 @@
* regardless of the value of @n_prealloced.
*
* Returns: a newly allocated #GValueArray with 0 values
+ * Deprecated: 2.32: Use #GArray and g_array_sized_new() instead.
*/
@@ -10787,6 +10944,7 @@
* %NULL, an uninitialized value is prepended.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_prepend_val() instead.
*/
@@ -10798,6 +10956,7 @@
* Remove the value at position @index_ from @value_array.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_remove_index() instead.
*/
@@ -10812,6 +10971,7 @@
* The current implementation uses Quick-Sort as sorting algorithm.
*
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_sort().
*/
@@ -10828,6 +10988,7 @@
*
* Rename to: g_value_array_sort
* Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
*/
diff -Nru gobject-introspection-1.31.10/girepository/gdump.c gobject-introspection-1.31.20/girepository/gdump.c
--- gobject-introspection-1.31.10/girepository/gdump.c 2011-09-03 16:33:30.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gdump.c 2012-02-03 18:33:01.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Dump introspection data
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Dump introspection data
*
* Copyright (C) 2008 Colin Walters
*
diff -Nru gobject-introspection-1.31.10/girepository/giarginfo.c gobject-introspection-1.31.20/girepository/giarginfo.c
--- gobject-introspection-1.31.10/girepository/giarginfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giarginfo.c 2012-02-03 18:33:07.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Argument implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Argument implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/giarginfo.h gobject-introspection-1.31.20/girepository/giarginfo.h
--- gobject-introspection-1.31.10/girepository/giarginfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giarginfo.h 2012-02-03 18:33:32.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Argument
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Argument
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gibaseinfo.c gobject-introspection-1.31.20/girepository/gibaseinfo.c
--- gobject-introspection-1.31.10/girepository/gibaseinfo.c 2011-12-08 20:00:31.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gibaseinfo.c 2012-02-03 18:33:35.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Base struct implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Base struct implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gibaseinfo.h gobject-introspection-1.31.20/girepository/gibaseinfo.h
--- gobject-introspection-1.31.10/girepository/gibaseinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gibaseinfo.h 2012-02-03 18:33:41.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: GIBaseInfo
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: GIBaseInfo
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gicallableinfo.c gobject-introspection-1.31.20/girepository/gicallableinfo.c
--- gobject-introspection-1.31.10/girepository/gicallableinfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gicallableinfo.c 2012-02-17 16:47:04.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Callable implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Callable implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gicallableinfo.h gobject-introspection-1.31.20/girepository/gicallableinfo.h
--- gobject-introspection-1.31.10/girepository/gicallableinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gicallableinfo.h 2012-02-03 18:33:46.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Callable
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Callable
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/giconstantinfo.c gobject-introspection-1.31.20/girepository/giconstantinfo.c
--- gobject-introspection-1.31.10/girepository/giconstantinfo.c 2011-10-10 14:57:55.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giconstantinfo.c 2012-02-03 18:33:49.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Constant implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Constant implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/giconstantinfo.h gobject-introspection-1.31.20/girepository/giconstantinfo.h
--- gobject-introspection-1.31.10/girepository/giconstantinfo.h 2011-10-10 14:57:55.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giconstantinfo.h 2012-02-03 18:33:51.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Constant
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Constant
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gi-dump-types.c gobject-introspection-1.31.20/girepository/gi-dump-types.c
--- gobject-introspection-1.31.10/girepository/gi-dump-types.c 2011-09-03 16:34:28.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gi-dump-types.c 2012-02-03 18:34:03.000000000 +0000
@@ -1,3 +1,4 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#include "gdump.c"
#include
diff -Nru gobject-introspection-1.31.10/girepository/gienuminfo.c gobject-introspection-1.31.20/girepository/gienuminfo.c
--- gobject-introspection-1.31.10/girepository/gienuminfo.c 2011-08-30 01:07:30.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gienuminfo.c 2012-02-03 18:34:06.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Enum implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Enum implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gienuminfo.h gobject-introspection-1.31.20/girepository/gienuminfo.h
--- gobject-introspection-1.31.10/girepository/gienuminfo.h 2011-08-30 01:07:30.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gienuminfo.h 2012-02-03 18:34:09.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Enum and Enum values
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Enum and Enum values
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gifieldinfo.c gobject-introspection-1.31.20/girepository/gifieldinfo.c
--- gobject-introspection-1.31.10/girepository/gifieldinfo.c 2011-08-25 19:49:38.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gifieldinfo.c 2012-02-03 18:34:12.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Field implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Field implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gifieldinfo.h gobject-introspection-1.31.20/girepository/gifieldinfo.h
--- gobject-introspection-1.31.10/girepository/gifieldinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gifieldinfo.h 2012-02-03 18:34:14.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Field and Field values
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Field and Field values
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gifunctioninfo.c gobject-introspection-1.31.20/girepository/gifunctioninfo.c
--- gobject-introspection-1.31.10/girepository/gifunctioninfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gifunctioninfo.c 2012-02-03 18:34:24.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Function implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Function implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gifunctioninfo.h gobject-introspection-1.31.20/girepository/gifunctioninfo.h
--- gobject-introspection-1.31.10/girepository/gifunctioninfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gifunctioninfo.h 2012-02-03 18:34:27.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Function
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Function
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/giinterfaceinfo.c gobject-introspection-1.31.20/girepository/giinterfaceinfo.c
--- gobject-introspection-1.31.10/girepository/giinterfaceinfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giinterfaceinfo.c 2012-02-03 18:34:29.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Interface implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Interface implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/giinterfaceinfo.h gobject-introspection-1.31.20/girepository/giinterfaceinfo.h
--- gobject-introspection-1.31.10/girepository/giinterfaceinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giinterfaceinfo.h 2012-02-03 18:34:32.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Interface
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Interface
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/ginvoke.c gobject-introspection-1.31.20/girepository/ginvoke.c
--- gobject-introspection-1.31.10/girepository/ginvoke.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/ginvoke.c 2012-02-17 16:47:04.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Invoke functionality
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Invoke functionality
*
* Copyright (C) 2005 Matthias Clasen
*
diff -Nru gobject-introspection-1.31.10/girepository/giobjectinfo.c gobject-introspection-1.31.20/girepository/giobjectinfo.c
--- gobject-introspection-1.31.10/girepository/giobjectinfo.c 2012-01-06 20:21:10.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giobjectinfo.c 2012-02-03 18:34:37.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Object implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Object implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
@@ -660,6 +661,66 @@
}
/**
+ * g_object_info_find_vfunc_using_interfaces:
+ * @info: a #GIObjectInfo
+ * @name: name of method to obtain
+ * @implementor: (out) (transfer full): The implementor of the interface
+ *
+ * Locate a virtual function slot with name @name, searching both the object
+ * @info and any interfaces it implements. Note that the namespace for
+ * virtuals is distinct from that of methods; there may or may not be a
+ * concrete method associated for a virtual. If there is one, it may be
+ * retrieved using g_vfunc_info_get_invoker(), otherwise %NULL will be
+ * returned.
+ *
+ * Note that this function does *not* search parent classes; you will have
+ * to chain up if that's desired.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIVFuncInfo *
+g_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
+ const gchar *name,
+ GIObjectInfo **implementor)
+{
+ GIVFuncInfo *result = NULL;
+ GIObjectInfo *implementor_result = NULL;
+
+ result = g_object_info_find_vfunc (info, name);
+ if (result)
+ implementor_result = g_base_info_ref ((GIBaseInfo*) info);
+
+ if (result == NULL)
+ {
+ int n_interfaces;
+ int i;
+
+ n_interfaces = g_object_info_get_n_interfaces (info);
+ for (i = 0; i < n_interfaces; ++i)
+ {
+ GIInterfaceInfo *iface_info;
+
+ iface_info = g_object_info_get_interface (info, i);
+
+ result = g_interface_info_find_vfunc (iface_info, name);
+
+ if (result != NULL)
+ {
+ implementor_result = iface_info;
+ break;
+ }
+ g_base_info_unref ((GIBaseInfo*) iface_info);
+ }
+ }
+ if (implementor)
+ *implementor = implementor_result;
+ else if (implementor_result != NULL)
+ g_base_info_unref ((GIBaseInfo*) implementor_result);
+ return result;
+}
+
+/**
* g_object_info_get_n_constants:
* @info: a #GIObjectInfo
*
diff -Nru gobject-introspection-1.31.10/girepository/giobjectinfo.h gobject-introspection-1.31.20/girepository/giobjectinfo.h
--- gobject-introspection-1.31.10/girepository/giobjectinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giobjectinfo.h 2012-02-03 18:34:39.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Object
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Object
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
@@ -108,6 +109,9 @@
gint n);
GIVFuncInfo * g_object_info_find_vfunc (GIObjectInfo *info,
const gchar *name);
+GIVFuncInfo * g_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
+ const gchar *name,
+ GIObjectInfo **implementor);
gint g_object_info_get_n_constants (GIObjectInfo *info);
GIConstantInfo * g_object_info_get_constant (GIObjectInfo *info,
gint n);
diff -Nru gobject-introspection-1.31.10/girepository/gipropertyinfo.c gobject-introspection-1.31.20/girepository/gipropertyinfo.c
--- gobject-introspection-1.31.10/girepository/gipropertyinfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gipropertyinfo.c 2012-02-03 18:34:41.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Property implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Property implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gipropertyinfo.h gobject-introspection-1.31.20/girepository/gipropertyinfo.h
--- gobject-introspection-1.31.10/girepository/gipropertyinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gipropertyinfo.h 2012-02-03 18:34:45.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Property
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Property
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/giregisteredtypeinfo.c gobject-introspection-1.31.20/girepository/giregisteredtypeinfo.c
--- gobject-introspection-1.31.10/girepository/giregisteredtypeinfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giregisteredtypeinfo.c 2012-02-03 18:34:47.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Registered Type implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Registered Type implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/giregisteredtypeinfo.h gobject-introspection-1.31.20/girepository/giregisteredtypeinfo.h
--- gobject-introspection-1.31.10/girepository/giregisteredtypeinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giregisteredtypeinfo.h 2012-02-03 18:34:49.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Registered Type
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Registered Type
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/girepository.c gobject-introspection-1.31.20/girepository/girepository.c
--- gobject-introspection-1.31.10/girepository/girepository.c 2011-10-10 14:57:48.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girepository.c 2012-02-08 13:41:45.000000000 +0000
@@ -1,5 +1,5 @@
-/* -*- Mode: C; c-file-style: "gnu"; -*- */
-/* GObject introspection: Repository implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Repository implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008 Colin Walters
@@ -93,7 +93,9 @@
(GDestroyNotify) NULL,
(GDestroyNotify) g_typelib_free);
repository->priv->lazy_typelibs
- = g_hash_table_new (g_str_hash, g_str_equal);
+ = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) NULL);
repository->priv->info_by_gtype
= g_hash_table_new_full (g_direct_hash, g_direct_equal,
(GDestroyNotify) NULL,
diff -Nru gobject-introspection-1.31.10/girepository/girepository.h gobject-introspection-1.31.20/girepository/girepository.h
--- gobject-introspection-1.31.10/girepository/girepository.h 2011-08-25 19:49:38.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girepository.h 2012-02-03 18:35:02.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Repository
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Repository
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/girepository-private.h gobject-introspection-1.31.20/girepository/girepository-private.h
--- gobject-introspection-1.31.10/girepository/girepository-private.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girepository-private.h 2012-02-03 18:35:06.000000000 +0000
@@ -1,5 +1,5 @@
-/* -*- Mode: C; c-file-style: "gnu"; -*- */
-/* GObject introspection: Private headers
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Private headers
*
* Copyright (C) 2010 Johan Dahlin
*
diff -Nru gobject-introspection-1.31.10/girepository/girffi.c gobject-introspection-1.31.20/girepository/girffi.c
--- gobject-introspection-1.31.10/girepository/girffi.c 2012-01-06 20:21:10.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girffi.c 2012-02-16 21:31:25.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Helper functions for ffi integration
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Helper functions for ffi integration
*
* Copyright (C) 2008 Red Hat, Inc
* Copyright (C) 2005 Matthias Clasen
@@ -230,13 +231,7 @@
GError **error)
{
const char *symbol;
- ffi_type *rtype;
- ffi_type **atypes;
- GITypeInfo *tinfo;
- GIArgInfo *ainfo;
- gboolean is_method;
- gboolean throws;
- gint n_args, n_invoke_args, i;
+ gpointer addr;
g_return_val_if_fail (info != NULL, FALSE);
g_return_val_if_fail (invoker != NULL, FALSE);
@@ -244,7 +239,7 @@
symbol = g_function_info_get_symbol ((GIFunctionInfo*) info);
if (!g_typelib_symbol (g_base_info_get_typelib((GIBaseInfo *) info),
- symbol, &(invoker->native_address)))
+ symbol, &addr))
{
g_set_error (error,
G_INVOKE_ERROR,
@@ -254,15 +249,79 @@
return FALSE;
}
- is_method = (g_function_info_get_flags (info) & GI_FUNCTION_IS_METHOD) != 0
- && (g_function_info_get_flags (info) & GI_FUNCTION_IS_CONSTRUCTOR) == 0;
- throws = g_function_info_get_flags (info) & GI_FUNCTION_THROWS;
+ return g_function_invoker_new_for_address (addr, info, invoker, error);
+}
+
+/**
+ * g_function_invoker_new_for_address:
+ * @addr: The address
+ * @info: A #GICallableInfo
+ * @invoker: Output invoker structure
+ * @error: A #GError
+ *
+ * Initialize the caller-allocated @invoker structure with a cache
+ * of information needed to invoke the C function corresponding to
+ * @info with the platform's default ABI.
+ *
+ * A primary intent of this function is that a dynamic structure allocated
+ * by a language binding could contain a #GIFunctionInvoker structure
+ * inside the binding's function mapping.
+ *
+ * Returns: %TRUE on success, %FALSE otherwise with @error set.
+ */
+gboolean
+g_function_invoker_new_for_address (gpointer addr,
+ GICallableInfo *info,
+ GIFunctionInvoker *invoker,
+ GError **error)
+{
+ ffi_type *rtype;
+ ffi_type **atypes;
+ GITypeInfo *tinfo;
+ GIArgInfo *ainfo;
+ GIInfoType info_type;
+ gboolean is_method;
+ gboolean throws;
+ gint n_args, n_invoke_args, i;
+
+ g_return_val_if_fail (info != NULL, FALSE);
+ g_return_val_if_fail (invoker != NULL, FALSE);
+
+ invoker->native_address = addr;
+
+ info_type = g_base_info_get_type ((GIBaseInfo *) info);
+
+ switch (info_type)
+ {
+ case GI_INFO_TYPE_FUNCTION:
+ {
+ GIFunctionInfoFlags flags;
+ flags = g_function_info_get_flags ((GIFunctionInfo *)info);
+ is_method = (flags & GI_FUNCTION_IS_METHOD) != 0;
+ throws = (flags & GI_FUNCTION_THROWS) != 0;
+ }
+ break;
+ case GI_INFO_TYPE_VFUNC:
+ {
+ GIVFuncInfoFlags flags;
+ flags = g_vfunc_info_get_flags ((GIVFuncInfo *)info);
+ throws = (flags & GI_VFUNC_THROWS) != 0;
+ }
+ is_method = TRUE;
+ break;
+ case GI_INFO_TYPE_CALLBACK:
+ is_method = TRUE;
+ throws = FALSE;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
- tinfo = g_callable_info_get_return_type ((GICallableInfo *)info);
+ tinfo = g_callable_info_get_return_type (info);
rtype = g_type_info_get_ffi_type (tinfo);
g_base_info_unref ((GIBaseInfo *)tinfo);
- n_args = g_callable_info_get_n_args ((GICallableInfo *)info);
+ n_args = g_callable_info_get_n_args (info);
if (is_method)
n_invoke_args = n_args+1;
else
@@ -282,7 +341,7 @@
for (i = 0; i < n_args; i++)
{
int offset = (is_method ? 1 : 0);
- ainfo = g_callable_info_get_arg ((GICallableInfo *)info, i);
+ ainfo = g_callable_info_get_arg (info, i);
switch (g_arg_info_get_direction (ainfo))
{
case GI_DIRECTION_IN:
diff -Nru gobject-introspection-1.31.10/girepository/girffi.h gobject-introspection-1.31.20/girepository/girffi.h
--- gobject-introspection-1.31.10/girepository/girffi.h 2011-06-21 22:02:36.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girffi.h 2012-02-17 16:47:04.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Helper functions for ffi integration
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Helper functions for ffi integration
*
* Copyright (C) 2008 Red Hat, Inc
*
@@ -53,6 +54,11 @@
GIFunctionInvoker *invoker,
GError **error);
+gboolean g_function_invoker_new_for_address (gpointer addr,
+ GICallableInfo *info,
+ GIFunctionInvoker *invoker,
+ GError **error);
+
void g_function_invoker_destroy (GIFunctionInvoker *invoker);
diff -Nru gobject-introspection-1.31.10/girepository/girmodule.c gobject-introspection-1.31.20/girepository/girmodule.c
--- gobject-introspection-1.31.10/girepository/girmodule.c 2011-08-25 19:49:38.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girmodule.c 2012-02-03 18:35:13.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Typelib creation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Typelib creation
*
* Copyright (C) 2005 Matthias Clasen
*
diff -Nru gobject-introspection-1.31.10/girepository/girmodule.h gobject-introspection-1.31.20/girepository/girmodule.h
--- gobject-introspection-1.31.10/girepository/girmodule.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girmodule.h 2012-02-03 18:35:15.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Parsed IDL
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Parsed IDL
*
* Copyright (C) 2005 Matthias Clasen
*
diff -Nru gobject-introspection-1.31.10/girepository/girnode.c gobject-introspection-1.31.20/girepository/girnode.c
--- gobject-introspection-1.31.10/girepository/girnode.c 2011-08-30 01:07:30.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girnode.c 2012-02-03 18:35:18.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Typelib creation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Typelib creation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
@@ -1784,6 +1785,7 @@
blob->must_be_implemented = 0; /* FIXME */
blob->must_not_be_implemented = 0; /* FIXME */
blob->class_closure = 0; /* FIXME */
+ blob->throws = vfunc->throws;
blob->reserved = 0;
if (vfunc->invoker)
diff -Nru gobject-introspection-1.31.10/girepository/girnode.h gobject-introspection-1.31.20/girepository/girnode.h
--- gobject-introspection-1.31.10/girepository/girnode.h 2011-08-30 01:07:30.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girnode.h 2012-02-03 18:35:22.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Parsed GIR
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Parsed GIR
*
* Copyright (C) 2005 Matthias Clasen
*
@@ -206,6 +207,7 @@
gboolean must_be_implemented;
gboolean must_not_be_implemented;
gboolean is_class_closure;
+ gboolean throws;
char *invoker;
diff -Nru gobject-introspection-1.31.10/girepository/giroffsets.c gobject-introspection-1.31.20/girepository/giroffsets.c
--- gobject-introspection-1.31.10/girepository/giroffsets.c 2011-06-21 14:10:43.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giroffsets.c 2012-02-03 18:35:25.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Compute structure offsets
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Compute structure offsets
*
* Copyright (C) 2008 Red Hat, Inc.
*
diff -Nru gobject-introspection-1.31.10/girepository/girparser.c gobject-introspection-1.31.20/girepository/girparser.c
--- gobject-introspection-1.31.10/girepository/girparser.c 2011-10-18 19:29:33.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girparser.c 2012-02-17 16:47:44.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: A parser for the XML GIR format
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: A parser for the XML GIR format
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008 Philip Van Hoof
@@ -2345,6 +2346,7 @@
const gchar *is_class_closure;
const gchar *offset;
const gchar *invoker;
+ const gchar *throws;
GIrNodeInterface *iface;
GIrNodeVFunc *vfunc;
@@ -2362,6 +2364,7 @@
is_class_closure = find_attribute ("is-class-closure", attribute_names, attribute_values);
offset = find_attribute ("offset", attribute_names, attribute_values);
invoker = find_attribute ("invoker", attribute_names, attribute_values);
+ throws = find_attribute ("throws", attribute_names, attribute_values);
if (name == NULL)
{
@@ -2400,6 +2403,11 @@
else
vfunc->is_class_closure = FALSE;
+ if (throws && strcmp (throws, "1") == 0)
+ vfunc->throws = TRUE;
+ else
+ vfunc->throws = FALSE;
+
if (offset)
vfunc->offset = atoi (offset);
else
@@ -3503,10 +3511,11 @@
if (ctx.modules)
return ctx.modules->data;
- g_set_error (error,
- G_MARKUP_ERROR,
- G_MARKUP_ERROR_INVALID_CONTENT,
- "Expected namespace element in the gir file");
+ if (error && *error == NULL)
+ g_set_error (error,
+ G_MARKUP_ERROR,
+ G_MARKUP_ERROR_INVALID_CONTENT,
+ "Expected namespace element in the gir file");
return NULL;
}
diff -Nru gobject-introspection-1.31.10/girepository/girparser.h gobject-introspection-1.31.20/girepository/girparser.h
--- gobject-introspection-1.31.10/girepository/girparser.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girparser.h 2012-02-03 18:35:31.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: A parser for the XML GIR format
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: A parser for the XML GIR format
*
* Copyright (C) 2005 Matthias Clasen
*
diff -Nru gobject-introspection-1.31.10/girepository/girwriter.c gobject-introspection-1.31.20/girepository/girwriter.c
--- gobject-introspection-1.31.10/girepository/girwriter.c 2011-08-25 19:49:38.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girwriter.c 2012-02-03 18:35:39.000000000 +0000
@@ -1,5 +1,5 @@
-/* -*- Mode: C; c-file-style: "gnu"; -*- */
-/* GObject introspection: IDL generator
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: IDL generator
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
@@ -916,6 +916,9 @@
else if (flags & GI_VFUNC_MUST_NOT_OVERRIDE)
xml_printf (file, " override=\"never\"");
+ if (flags & GI_VFUNC_THROWS)
+ xml_printf (file, " throws=\"1\"");
+
xml_printf (file, " offset=\"%d\"", offset);
if (invoker)
diff -Nru gobject-introspection-1.31.10/girepository/girwriter.h gobject-introspection-1.31.20/girepository/girwriter.h
--- gobject-introspection-1.31.10/girepository/girwriter.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/girwriter.h 2012-02-03 18:35:41.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: IDL writer
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: IDL writer
*
* Copyright (C) 2007 Johan Dahlin
*
diff -Nru gobject-introspection-1.31.10/girepository/gisignalinfo.c gobject-introspection-1.31.20/girepository/gisignalinfo.c
--- gobject-introspection-1.31.10/girepository/gisignalinfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gisignalinfo.c 2012-02-03 18:35:43.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Signal implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Signal implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gisignalinfo.h gobject-introspection-1.31.20/girepository/gisignalinfo.h
--- gobject-introspection-1.31.10/girepository/gisignalinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gisignalinfo.h 2012-02-03 18:35:45.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Signal
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Signal
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gistructinfo.c gobject-introspection-1.31.20/girepository/gistructinfo.c
--- gobject-introspection-1.31.10/girepository/gistructinfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gistructinfo.c 2012-02-03 18:35:47.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Struct implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Struct implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gistructinfo.h gobject-introspection-1.31.20/girepository/gistructinfo.h
--- gobject-introspection-1.31.10/girepository/gistructinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gistructinfo.h 2012-02-03 18:35:49.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Struct
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Struct
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gitypeinfo.c gobject-introspection-1.31.20/girepository/gitypeinfo.c
--- gobject-introspection-1.31.10/girepository/gitypeinfo.c 2011-08-25 19:49:38.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gitypeinfo.c 2012-02-16 21:31:25.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Type implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Type implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gitypeinfo.h gobject-introspection-1.31.20/girepository/gitypeinfo.h
--- gobject-introspection-1.31.10/girepository/gitypeinfo.h 2011-08-25 19:49:38.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gitypeinfo.h 2012-02-16 21:31:25.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Type
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Type
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gitypelib.c gobject-introspection-1.31.20/girepository/gitypelib.c
--- gobject-introspection-1.31.10/girepository/gitypelib.c 2011-12-08 20:00:31.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gitypelib.c 2012-02-03 18:35:55.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: typelib validation, auxiliary functions
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: typelib validation, auxiliary functions
* related to the binary typelib format
*
* Copyright (C) 2005 Matthias Clasen
diff -Nru gobject-introspection-1.31.10/girepository/gitypelib.h gobject-introspection-1.31.20/girepository/gitypelib.h
--- gobject-introspection-1.31.10/girepository/gitypelib.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gitypelib.h 2012-02-03 18:35:59.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Public typelib API
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Public typelib API
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/gitypelib-internal.h gobject-introspection-1.31.20/girepository/gitypelib-internal.h
--- gobject-introspection-1.31.10/girepository/gitypelib-internal.h 2011-08-30 01:07:30.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gitypelib-internal.h 2012-02-08 13:42:12.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: struct definitions for the binary
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: struct definitions for the binary
* typelib format, validation
*
* Copyright (C) 2005 Matthias Clasen
@@ -281,7 +282,7 @@
guint32 sections;
/* */
- guint16 padding[5];
+ guint16 padding[6];
} Header;
typedef enum {
@@ -433,6 +434,10 @@
gint8 closure;
gint8 destroy;
+ /* */
+ guint16 padding;
+ /* */
+
SimpleTypeBlob arg_type;
} ArgBlob;
@@ -925,7 +930,8 @@
guint16 must_be_implemented : 1;
guint16 must_not_be_implemented : 1;
guint16 class_closure : 1;
- guint16 reserved :12;
+ guint16 throws : 1;
+ guint16 reserved :11;
guint16 signal;
guint16 struct_offset;
@@ -1049,6 +1055,8 @@
guint16 n_vfuncs;
guint16 n_constants;
+ guint16 padding;
+
guint32 reserved2;
guint32 reserved3;
diff -Nru gobject-introspection-1.31.10/girepository/gitypes.h gobject-introspection-1.31.20/girepository/gitypes.h
--- gobject-introspection-1.31.10/girepository/gitypes.h 2012-01-06 19:46:42.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gitypes.h 2012-02-03 18:36:06.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: types
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: types
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
@@ -403,6 +404,7 @@
* @GI_VFUNC_MUST_CHAIN_UP: chains up to the parent type
* @GI_VFUNC_MUST_OVERRIDE: overrides
* @GI_VFUNC_MUST_NOT_OVERRIDE: does not override
+ * @GI_VFUNC_THROWS: Includes a #GError
*
* Flags of a #GIVFuncInfo struct.
*/
@@ -410,7 +412,8 @@
{
GI_VFUNC_MUST_CHAIN_UP = 1 << 0,
GI_VFUNC_MUST_OVERRIDE = 1 << 1,
- GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2
+ GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2,
+ GI_VFUNC_THROWS = 1 << 3
} GIVFuncInfoFlags;
/**
diff -Nru gobject-introspection-1.31.10/girepository/giunioninfo.c gobject-introspection-1.31.20/girepository/giunioninfo.c
--- gobject-introspection-1.31.10/girepository/giunioninfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giunioninfo.c 2012-02-03 18:36:08.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Union implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Union implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/giunioninfo.h gobject-introspection-1.31.20/girepository/giunioninfo.h
--- gobject-introspection-1.31.10/girepository/giunioninfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/giunioninfo.h 2012-02-03 18:36:10.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Union
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Union
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/givfuncinfo.c gobject-introspection-1.31.20/girepository/givfuncinfo.c
--- gobject-introspection-1.31.10/girepository/givfuncinfo.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/givfuncinfo.c 2012-02-03 18:36:13.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Virtual Function implementation
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Virtual Function implementation
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
@@ -104,6 +105,9 @@
if (blob->must_not_be_implemented)
flags = flags | GI_VFUNC_MUST_NOT_OVERRIDE;
+ if (blob->throws)
+ flags = flags | GI_VFUNC_THROWS;
+
return flags;
}
diff -Nru gobject-introspection-1.31.10/girepository/givfuncinfo.h gobject-introspection-1.31.20/girepository/givfuncinfo.h
--- gobject-introspection-1.31.10/girepository/givfuncinfo.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/givfuncinfo.h 2012-02-03 18:36:16.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Virtual Functions
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Virtual Functions
*
* Copyright (C) 2005 Matthias Clasen
* Copyright (C) 2008,2009 Red Hat, Inc.
diff -Nru gobject-introspection-1.31.10/girepository/glib-compat.h gobject-introspection-1.31.20/girepository/glib-compat.h
--- gobject-introspection-1.31.10/girepository/glib-compat.h 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/glib-compat.h 2012-02-03 18:36:19.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Compatibility definitions
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Compatibility definitions
*
* Copyright (C) 2009 Javier Jardón
*
diff -Nru gobject-introspection-1.31.10/girepository/gthash.c gobject-introspection-1.31.20/girepository/gthash.c
--- gobject-introspection-1.31.10/girepository/gthash.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gthash.c 2012-02-03 18:36:22.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Typelib hashing
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Typelib hashing
*
* Copyright (C) 2010 Red Hat, Inc.
*
diff -Nru gobject-introspection-1.31.10/girepository/gthash-test.c gobject-introspection-1.31.20/girepository/gthash-test.c
--- gobject-introspection-1.31.10/girepository/gthash-test.c 2011-06-10 15:36:50.000000000 +0000
+++ gobject-introspection-1.31.20/girepository/gthash-test.c 2012-02-03 18:36:24.000000000 +0000
@@ -1,4 +1,5 @@
-/* GObject introspection: Test typelib hashing
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Test typelib hashing
*
* Copyright (C) 2010 Red Hat, Inc.
*
diff -Nru gobject-introspection-1.31.10/giscanner/ast.py gobject-introspection-1.31.20/giscanner/ast.py
--- gobject-introspection-1.31.10/giscanner/ast.py 2012-01-06 20:21:10.000000000 +0000
+++ gobject-introspection-1.31.20/giscanner/ast.py 2012-02-20 17:19:27.000000000 +0000
@@ -556,6 +556,7 @@
self.parameters = parameters
self.throws = not not throws
self.instance_parameter = None # Parameter
+ self.parent = None # A Class or Interface
def get_parameter_index(self, name):
for i, parameter in enumerate(self.parameters):
@@ -1007,6 +1008,7 @@
self.transfer = PARAM_TRANSFER_NONE
else:
self.transfer = transfer
+ self.parent = None # A Class or Interface
class Callback(Callable):
diff -Nru gobject-introspection-1.31.10/giscanner/docbookdescription.py gobject-introspection-1.31.20/giscanner/docbookdescription.py
--- gobject-introspection-1.31.10/giscanner/docbookdescription.py 2011-08-30 01:07:30.000000000 +0000
+++ gobject-introspection-1.31.20/giscanner/docbookdescription.py 1970-01-01 00:00:00.000000000 +0000
@@ -1,185 +0,0 @@
-
-TAG_PROGRAM_LISTING = '', ''}
-
-def get_formatted_description(description):
- desc = description.replace("|[", "") \
- .replace("]|", "")
-
- desc = "%s" % desc
-
-# we still need to handle this case
-# # Handle "#include "
-# $text =~ s/#include(\s+)<([^>]+)>/#include$1<$2>/g;
-
- formatted_desc = ""
-
- inside_tags = []
- last_offset = 0
- for start, end, tag in _find_xml_tag_matches(desc):
- if len(inside_tags) == 0:
- new_desc = "\n\n\n".join(desc[last_offset:start].split('\n\n'))
- else:
- new_desc = desc[last_offset:start]
-
- if TAG_CDATA not in inside_tags:
- new_desc = _escape_non_cdata_section(new_desc)
-
- formatted_desc += new_desc
- formatted_desc += tag
- if tag == TAG_PROGRAM_LISTING:
- formatted_desc += '>'
-
- if tag in (TAG_CDATA, TAG_PROGRAM_LISTING):
- inside_tags.append(tag)
- else:
- try:
- inside_tags.pop()
- except IndexError:
- print "Error: mismatched tag:", tag
- last_offset = end
-
- formatted_desc += _escape_non_cdata_section(desc[last_offset:])
- return formatted_desc
-
-def _find_xml_tag_matches(string):
- offset = 0
- while True:
- indexes = []
- for tag in TAGS:
- pos = string.find(tag, offset)
- if pos != -1:
- indexes.append((tag, pos))
-
- if indexes:
- tag, first = min(indexes, key=lambda x: x[1])
- if tag == TAG_PROGRAM_LISTING:
- end = string.find('>', first + len(tag) - 1) + 1
- else:
- end = first + len(tag)
- offset = end
- yield first, end, tag
- else:
- return
-
-def _escape_non_cdata_section(string):
- string = _escape_ampersand_not_in_entity(string)
- string = _escape_lt_not_in_xml_tag(string)
- return _escape_gt_not_in_xml_tag(string)
-
-def _escape_ampersand_not_in_entity(string):
- parts = string.split('&')
-
- output = parts[0]
- for part in parts[1:]:
- end = part.find(';')
- if end == -1 or not part[:end].isalpha():
- output += "&"
- else:
- output += "&"
- output += part
-
- return output
-
-def _is_valid_xml_tag_name(name):
- if len(name) < 1:
- return False
- elif name.isalpha() or (name[0].isalpha() and name[1:].isalnum()):
- return True
-
-def _is_valid_xml_tag(string):
- # handle case where line end is between tag name and first argument.
- # ie. My Link
- string = string.replace('\n', ' ')
-
- if string[-1] == '/':
- string = string[:-1]
-
- # string is the inner part of the tag, without < and >
- if string[0] == '/' and _is_valid_xml_tag_name(string[1:]):
- #valid end tag
- return True
- elif _is_valid_xml_tag_name(string):
- #valid start tag with not params
- return True
- elif " " in string:
- # we are looking for:
- # TODO: handle spaces in values (between quotations)
- tagname, rest = string.split(" ", 1)
- if not _is_valid_xml_tag_name(tagname):
- return False
-
- while rest.strip():
- rest = rest.lstrip()
-
- if not '=' in rest:
- return False
- argname, rest = rest.split('=', 1)
- if not _is_valid_xml_tag_name(argname):
- return False
- if rest[0] != '"':
- return False
- value, rest = rest[1:].split('"', 1)
-
- return True
-
-def _escape_lt_not_in_xml_tag(string):
- parts = string.split('<')
-
- output = parts[0]
- for part in parts[1:]:
- end = part.find('>')
- if end == -1 or not _is_valid_xml_tag(part[:end]):
- output += "<"
- else:
- output += "<"
- output += part
-
- return output
-
-def _escape_gt_not_in_xml_tag(string):
- parts = string.split('>')
-
- output = parts[0]
- for part in parts[1:]:
- start = output.rfind('<')
- if start == -1 or not _is_valid_xml_tag(output[start+1:]):
- output += ">"
- else:
- output += ">"
- output += part
-
- return output
-
-
-def test():
- assert _is_valid_xml_tag_name('a')
- assert _is_valid_xml_tag_name('refsect1')
- assert not _is_valid_xml_tag_name('1refsect')
- assert not _is_valid_xml_tag_name('1')
-
- assert _is_valid_xml_tag('/a')
- assert _is_valid_xml_tag('/refsect1')
- assert not _is_valid_xml_tag('/1')
- assert _is_valid_xml_tag('link')
- assert _is_valid_xml_tag('link linkend="value"')
- assert _is_valid_xml_tag('link linkend="value"')
- assert _is_valid_xml_tag('link/')
- assert _is_valid_xml_tag('link linkend="value"/')
- assert _is_valid_xml_tag('link linkend="value" arg23="anothervalue"')
- assert _is_valid_xml_tag('link linkend="value" arg23="anothervalue with spaces"')
- assert not _is_valid_xml_tag('link linkend="value arg23="anothervalue with spaces"')
- assert not _is_valid_xml_tag('link linkend')
- assert _is_valid_xml_tag('link\nlinkend="link-id"')
- assert _is_valid_xml_tag('xref linkend="gtkstylecontext-classes"/')
-
- assert _is_valid_xml_tag('a href="http://www.gtk.org" title="<i>Our</i> website"')
- assert _is_valid_xml_tag('ulink \nurl="http://www.freedesktop.org/Standards/wm-spec"')
-
- string = 'gtk_label_set_markup (label, "Go to the GTK+ website for more...");'
- assert _escape_lt_not_in_xml_tag(string) == string
-
-if __name__ == '__main__':
- test()
diff -Nru gobject-introspection-1.31.10/giscanner/docbookwriter.py gobject-introspection-1.31.20/giscanner/docbookwriter.py
--- gobject-introspection-1.31.10/giscanner/docbookwriter.py 2011-08-30 01:07:30.000000000 +0000
+++ gobject-introspection-1.31.20/giscanner/docbookwriter.py 1970-01-01 00:00:00.000000000 +0000
@@ -1,569 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: Python -*-
-# GObject-Introspection - a framework for introspecting GObject libraries
-# Copyright (C) 2010 Zach Goldberg
-# Copyright (C) 2011 Johan Dahlin
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-
-import sys
-
-from . import ast
-from .girparser import GIRParser
-from .xmlwriter import XMLWriter
-from .docbookdescription import get_formatted_description
-
-XMLNS = "http://docbook.org/ns/docbook"
-XMLVERSION = "5.0"
-DOCTYPE = """
-
-]>""" #"
-
-def _space(num):
- return " " * num
-
-class DocBookFormatter(object):
- def __init__(self):
- self.namespace = None
- self.writer = None
-
- def set_namespace(self, namespace):
- self.namespace = namespace
-
- def set_writer(self, writer):
- self.writer = writer
-
- def get_type_string(self, type):
- return str(type.ctype)
-
- def render_parameter(self, param_type, param_name):
- return "%s %s" % (param_type, param_name)
-
- def _render_parameter(self, param, extra_content=''):
- with self.writer.tagcontext("parameter"):
- if param.type.ctype is not None:
- link_dest = param.type.ctype.replace("*", "")
- else:
- link_dest = param.type.ctype
- with self.writer.tagcontext("link", [("linkend", "%s" % link_dest)]):
- self.writer.write_tag("type", [], link_dest)
- self.writer.write_line(extra_content)
-
- def _render_parameters(self, parent, parameters):
- self.writer.write_line(
- "%s(" % _space(40 - len(parent.symbol)))
-
- parent_class = parent.parent_class
- ctype = ast.Type(parent.parent_class.ctype + '*')
- params = []
- params.append(ast.Parameter(parent_class.name.lower(), ctype))
- params.extend(parameters)
-
- first_param = True
- for param in params:
- if not first_param:
- self.writer.write_line("\n%s" % _space(61))
- else:
- first_param = False
-
- if not param == params[-1]:
- comma = ", "
- else:
- comma = ""
-
- if isinstance(param.type, ast.Varargs):
- with self.writer.tagcontext("parameter"):
- self.writer.write_line('...%s' % comma)
- else:
- extra_content = " "
- if param.type.ctype is not None and '*' in param.type.ctype:
- extra_content += '*'
- extra_content += param.argname
- extra_content += comma
- self._render_parameter(param, extra_content)
-
- self.writer.write_line(");\n")
-
- def get_method_as_title(self, method):
- return "%s ()" % method.symbol
-
- def get_page_name(self, node):
- # page name is only used for xml:id (not displayed to users)
- if isinstance(node, ast.Alias) or node.gtype_name is None:
- return node.ctype
- return node.gtype_name
-
- def get_class_name(self, node):
- if node.gtype_name is None:
- return node.ctype
- return node.gtype_name
-
- def get_type_name(self, node):
- if isinstance(node, ast.Array):
- if node.array_type == ast.Array.C:
- return str(node.element_type) + "[]"
- else:
- return "%s<%s>" % (node.array_type, str(node.element_type))
- elif isinstance(node, ast.Map):
- return "GHashTable<%s, %s>" % (str(node.key_type), str(node.value_type))
- elif isinstance(node, ast.List):
- return "GList<%s>" % str(node.element_type)
- else:
- return str(node)
-
- def render_method(self, method, link=False):
- self.writer.disable_whitespace()
-
- retval_type = method.retval.type
- if retval_type.ctype:
- link_dest = retval_type.ctype.replace("*", "")
- else:
- link_dest = str(retval_type)
-
- if retval_type.target_giname:
- ns = retval_type.target_giname.split('.')
- if ns[0] == self.namespace.name:
- link_dest = "%s" % (
- retval_type.ctype.replace("*", ""))
-
- with self.writer.tagcontext("link", [("linkend", link_dest)]):
- self.writer.write_tag("returnvalue", [], link_dest)
-
- if '*' in retval_type.ctype:
- self.writer.write_line(' *')
-
- self.writer.write_line(
- _space(20 - len(self.get_type_string(method.retval.type))))
-
- if link:
- self.writer.write_tag("link", [("linkend",
- method.symbol.replace("_", "-"))],
- method.symbol)
- else:
- self.writer.write_line(method.symbol)
-
- self._render_parameters(method, method.parameters)
- self.writer.enable_whitespace()
-
- def _get_annotations(self, argument):
- annotations = {}
-
- if hasattr(argument.type, 'element_type') and \
- argument.type.element_type is not None:
- if isinstance(argument.type.element_type, ast.Array):
- element_type = argument.type.element_type.array_type
- else:
- element_type = argument.type.element_type
- annotations['element-type'] = element_type
-
- if argument.transfer is not None and argument.transfer != 'none':
- annotations['transfer'] = argument.transfer
-
- if hasattr(argument, 'allow_none') and argument.allow_none:
- annotations['allow-none'] = None
-
- return annotations
-
- def render_param_list(self, method):
- self._render_param(method.parent_class.name.lower(), 'instance', [])
-
- for param in method.parameters:
- if isinstance(param.type, ast.Varargs):
- argname = '...'
- else:
- argname = param.argname
- self._render_param(argname, param.doc, self._get_annotations(param))
-
- self._render_param('Returns', method.retval.doc,
- self._get_annotations(method.retval))
-
- def _render_param(self, argname, doc, annotations):
- with self.writer.tagcontext('varlistentry'):
- with self.writer.tagcontext('term'):
- self.writer.disable_whitespace()
- try:
- with self.writer.tagcontext('parameter'):
- self.writer.write_line(argname)
- if doc is not None:
- self.writer.write_line(' :')
- finally:
- self.writer.enable_whitespace()
- if doc is not None:
- with self.writer.tagcontext('listitem'):
- with self.writer.tagcontext('simpara'):
- self.writer.write_line(doc)
- if annotations:
- with self.writer.tagcontext('emphasis', [('role', 'annotation')]):
- for key, value in annotations.iteritems():
- self.writer.disable_whitespace()
- try:
- self.writer.write_line('[%s' % key)
- if value is not None:
- self.writer.write_line(' %s' % value)
- self.writer.write_line(']')
- finally:
- self.writer.enable_whitespace()
-
- def render_property(self, prop, link=False):
- prop_name = '"%s"' % prop.name
- prop_type = self.get_type_name(prop.type)
-
- flags = []
- if prop.readable:
- flags.append("Read")
- if prop.writable:
- flags.append("Write")
- if prop.construct:
- flags.append("Construct")
- if prop.construct_only:
- flags.append("Construct Only")
-
- self._render_prop_or_signal(prop_name, prop_type, flags)
-
- def _render_prop_or_signal(self, name, type_, flags):
- self.writer.disable_whitespace()
-
- line = _space(2) + name + _space(27 - len(name))
- line += str(type_) + _space(22 - len(str(type_)))
- line += ": " + " / ".join(flags)
-
- self.writer.write_line(line + "\n")
-
- self.writer.enable_whitespace()
-
-
- def render_signal(self, signal, link=False):
- sig_name = '"%s"' % signal.name
-
- flags = []
- if signal.when == "first":
- flags.append("Run First")
- elif signal.when == "last":
- flags.append("Run Last")
- elif signal.when == "cleanup":
- flags.append("Cleanup")
-
- if signal.no_recurse:
- flags.append('No Recursion')
- if signal.detailed:
- flags.append("Has Details")
- if signal.action:
- flags.append("Action")
- if signal.no_hooks:
- flags.append("No Hooks")
-
- self._render_prop_or_signal(sig_name, "", flags)
-
-
-class DocBookFormatterPython(DocBookFormatter):
- def get_title(self, page):
- return "%s.%s" % (page.ast.namespace.name, page.ast.name)
-
- def render_struct(self, page):
- class_ = page.ast
- try:
- self.writer.disable_whitespace()
- self.writer.write_line("class %s" % self.get_title(page))
-
- if hasattr(page.ast, "parent") and page.ast.parent is not None:
- if isinstance(page.ast.parent, ast.Type):
- parent_name = page.ast.parent
- else:
- parent_name = "%s.%s" % (page.ast.parent.namespace.name,
- page.ast.parent.name)
- elif isinstance(page.ast, ast.Interface):
- parent_name = "GObject.Interface"
- else:
- parent_name = None
- if parent_name is not None:
- self.writer.write_line("(%s)" % (parent_name))
-
- self.writer.write_line(":\n")
- finally:
- self.writer.enable_whitespace()
-
-
-class DocBookFormatterC(DocBookFormatter):
- def get_title(self, page):
- return page.ast.ctype
-
- def render_struct(self, page):
- try:
- self.writer.disable_whitespace()
- self.writer.write_line("struct ")
- self.writer.write_tag(
- "link",
- [("linkend", "%s-struct" % page.name)],
- "%s" % page.name)
- self.writer.write_line(";\n")
- finally:
- self.writer.enable_whitespace()
-
-
-class DocBookPage(object):
- def __init__(self, name, ast_node):
- self.methods = []
- self.properties = []
- self.signals = []
- self.name = name
- self.description = ast_node.doc
- self.ast = ast_node
- self.id = None
-
- if isinstance(ast_node, (ast.Class, ast.Record, ast.Interface)):
- for method in ast_node.methods:
- method.parent_class = ast_node
- self.methods = ast_node.methods
-
- if isinstance(ast_node, (ast.Class, ast.Interface)):
- self.properties = ast_node.properties
- self.signals = ast_node.signals
-
- def get_methods(self):
- return self.methods
-
- def get_properties(self):
- return self.properties
-
- def get_signals(self):
- return self.signals
-
-class DocBookWriter(object):
- def __init__(self, formatter):
- self._namespace = None
- self._pages = []
-
- self._writer = XMLWriter()
-
- formatter.set_writer(self._writer)
- self._formatter = formatter
-
- def _add_page(self, page):
- self._pages.append(page)
-
- def add_transformer(self, transformer):
- self._transformer = transformer
-
- self._namespace = self._transformer._namespace
- self._formatter.set_namespace(self._namespace)
-
- for name, node in self._namespace.iteritems():
- if isinstance(node, (ast.Class, ast.Record, ast.Interface, ast.Alias)):
- page_name = self._formatter.get_page_name(node)
- self._add_node(node, page_name)
-
- def _add_node(self, node, name):
- page = DocBookPage(name, node)
- self._add_page(page)
-
- if isinstance(node, (ast.Class, ast.Record, ast.Interface, ast.Alias)):
- page.id = node.ctype
-
- def write(self, output):
- self._writer.write_line(DOCTYPE)
- with self._writer.tagcontext("book", [
- ("xml:id", "page_%s" % self._namespace.name),
- ("xmlns", XMLNS),
- ("version", XMLVERSION)]):
- self._writer.write_tag("title", [], "%s Documentation" % (
- self._namespace.name))
-
- for page in self._pages:
- self._render_page(page)
-
- fp = open(output, 'w')
- fp.write(self._writer.get_xml())
- fp.close()
-
- def _render_page(self, page):
- with self._writer.tagcontext("chapter", [("xml:id", "ch_%s" % (
- page.name))]):
- self._writer.write_tag(
- "title", [], self._formatter.get_title(page))
-
- with self._writer.tagcontext("refsynopsisdiv",
- [('id', '%s.synopsis' % page.name),
- ('role', 'synopsis')]):
-
- self._writer.write_tag(
- "title", [("role", "synopsis.title")], "Synopsis")
-
- if not isinstance(page.ast, ast.Alias):
- self._writer.write_tag("anchor", [("id", page.name)])
-
- with self._writer.tagcontext('synopsis'):
- self._formatter.render_struct(page)
-
- for ast_node in page.get_methods():
- self._formatter.render_method(ast_node, link=True)
-
- if isinstance(page.ast, (ast.Class, ast.Interface)):
- with self._writer.tagcontext("refsect1",
- [('id', '%s.object-hierarchy' % page.name),
- ('role', 'object_hierarchy')]):
- self._writer.write_tag('title', [('role', 'object_hierarchy.title')],
- "Object Hierarchy")
- with self._writer.tagcontext('synopsis'):
- self._render_page_object_hierarchy(page.ast)
-
- if page.get_properties():
- with self._writer.tagcontext('refsect1',
- [('id', '%s.properties' % page.name),
- ('role', 'properties')]):
- self._writer.write_tag("title", [('role', 'properties.title')],
- "Properties")
- with self._writer.tagcontext("synopsis"):
- for ast_node in page.get_properties():
- if isinstance(ast_node.type, ast.TypeUnknown):
- print "Warning: ignoring property '%s' for " \
- "lack of type" % ast_node.name
- continue
- self._formatter.render_property(ast_node, link=True)
-
- if page.get_signals():
- with self._writer.tagcontext('refsect1',
- [('id', '%s.signals' % page.name),
- ('role', 'signal_proto')]):
- self._writer.write_tag('title', [('role', 'signal_proto.title')],
- "Signals")
- with self._writer.tagcontext('synopsis'):
- for ast_node in page.get_signals():
- self._formatter.render_signal(ast_node, link=True)
-
- if page.description:
- with self._writer.tagcontext('refsect1',
- [('id', '%s.description' % (page.name, ))]):
- self._writer.write_tag(
- "title", [("role", "desc.title")], "Description")
- self._render_description(page.description)
-
- with self._writer.tagcontext('refsect1',
- [('id', "%s-details" % page.id.lower()),
- ("role", "details")]):
- self._writer.write_tag("title", [("role", "details.title")],
- "Details")
-
- if isinstance(page.ast, ast.Alias):
- self._render_alias_detail(page.ast)
- else:
- self._render_struct_detail(page.ast)
-
- for ast_node in page.get_methods():
- self._render_method(ast_node)
-
- if page.get_properties():
- with self._writer.tagcontext('refsect1',
- [('id', '%s.property-details' % page.name),
- ('role', 'property_details')]):
- self._writer.write_tag('title', [('role', 'property_details.title')],
- "Property Details")
- for ast_node in page.get_properties():
- self._render_property(ast_node)
-
- if page.get_signals():
- with self._writer.tagcontext('refsect1',
- [('id', '%s.signal-details' % page.name),
- ('role', 'signals')]):
- self._writer.write_tag('title', [('role', 'signal.title')],
- "Signal Details")
- for ast_node in page.get_signals():
- self._render_signal(ast_node)
-
- def _render_alias_detail(self, alias):
- with self._writer.tagcontext('refsect2',
- [('id', "%s" % alias.ctype),
- ('role', 'typedef')]):
- self._writer.write_tag("title", [], "%s" % alias.ctype)
- with self._writer.tagcontext("indexterm", [("zone", "%s" % alias.ctype)]):
- self._writer.write_tag("primary", [("sortas", alias.name)], alias.ctype)
- self._writer.write_tag("programlisting",
- [],
- "typedef %s %s" % (alias.target.ctype,
- alias.ctype))
- self._writer.write_tag("para", [], alias.doc)
-
- def _render_struct_detail(self, struct):
- with self._writer.tagcontext('refsect2',
- [('id', "%s-struct" % struct.ctype),
- ('role', 'struct')]):
- self._writer.write_tag("title", [], "struct %s" % struct.ctype)
- with self._writer.tagcontext("indexterm", [("zone", "%s-struct" % struct.ctype)]):
- self._writer.write_tag("primary", [("sortas", struct.name)], struct.ctype)
- self._writer.write_tag("programlisting", [], "struct %s;" % struct.ctype)
-
- def _render_method(self, ast_node):
-
- link_name = ast_node.symbol.replace("_", "-")
-
- self._writer.push_tag('refsect2',
- [('id', link_name),
- ('role', 'function')])
- self._writer.write_tag("title", [],
- self._formatter.get_method_as_title(ast_node))
-
- with self._writer.tagcontext("indexterm", [("zone", link_name)]):
- self._writer.write_tag("primary", [], ast_node.name)
-
- with self._writer.tagcontext("programlisting"):
- self._formatter.render_method(ast_node)
-
- description = ast_node.doc
- if description:
- self._render_description(ast_node.doc)
-
- with self._writer.tagcontext("variablelist", [("role", "params")]):
- self._formatter.render_param_list(ast_node)
-
- self._writer.pop_tag()
-
- def _render_property(self, ast_node):
- self._writer.write_line("Not implemented yet")
-
- def _render_signal(self, ast_node):
- self._writer.write_line("Not implemented yet")
-
- def _render_page_object_hierarchy(self, page_node):
- parent_chain = self._get_parent_chain(page_node)
- parent_chain.append(page_node)
- lines = []
-
- for level, parent in enumerate(parent_chain):
- prepend = ""
- if level > 0:
- prepend = _space((level - 1)* 6) + " +----"
- lines.append(_space(2) + prepend + self._formatter.get_class_name(parent))
-
- self._writer.disable_whitespace()
- self._writer.write_line("\n".join(lines))
- self._writer.enable_whitespace()
-
- def _render_description(self, description):
- formatted_desc = get_formatted_description(description)
- self._writer.write_line(formatted_desc)
-
- def _get_parent_chain(self, page_node):
- parent_chain = []
-
- node = page_node
- while node.parent and node.gi_name != 'GObject.Object':
- node = self._transformer.lookup_giname(str(node.parent))
- parent_chain.append(node)
-
- parent_chain.reverse()
- return parent_chain
diff -Nru gobject-introspection-1.31.10/giscanner/docmain.py gobject-introspection-1.31.20/giscanner/docmain.py
--- gobject-introspection-1.31.10/giscanner/docmain.py 2011-08-30 01:07:30.000000000 +0000
+++ gobject-introspection-1.31.20/giscanner/docmain.py 2012-02-21 15:43:45.000000000 +0000
@@ -21,39 +21,15 @@
import os
import optparse
-from .docbookwriter import DocBookWriter
-from .docbookwriter import DocBookFormatterC
-from .docbookwriter import DocBookFormatterPython
from .mallardwriter import MallardWriter
-from .mallardwriter import MallardFormatterC
-from .mallardwriter import MallardFormatterPython
from .transformer import Transformer
-class GIDocGenerator(object):
-
- def parse(self, filename):
- if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
- top_srcdir = os.environ['UNINSTALLED_INTROSPECTION_SRCDIR']
- top_builddir = os.environ['UNINSTALLED_INTROSPECTION_BUILDDIR']
- extra_include_dirs = [os.path.join(top_srcdir, 'gir'), top_builddir]
- else:
- extra_include_dirs = []
- self.transformer = Transformer.parse_from_gir(filename, extra_include_dirs)
-
- def generate(self, writer, output):
- writer.add_transformer(self.transformer)
- writer.write(output)
-
def doc_main(args):
parser = optparse.OptionParser('%prog [options] GIR-file')
parser.add_option("-o", "--output",
action="store", dest="output",
- help="Filename to write output")
- parser.add_option("-f", "--format",
- action="store", dest="format",
- default="docbook",
- help="Output format")
+ help="Directory to write output to")
parser.add_option("-l", "--language",
action="store", dest="language",
default="Python",
@@ -62,32 +38,21 @@
options, args = parser.parse_args(args)
if not options.output:
raise SystemExit("missing output parameter")
+ if not os.path.isdir(options.output):
+ raise SystemExit("wrong output parameter: %s", options.output)
if len(args) < 2:
raise SystemExit("Need an input GIR filename")
- if options.format == "docbook":
- if options.language == "Python":
- formatter = DocBookFormatterPython()
- elif options.language == "C":
- formatter = DocBookFormatterC()
- else:
- raise SystemExit("Unsupported language: %s" % (options.language, ))
- writer = DocBookWriter(formatter)
- elif options.format == "mallard":
- if options.language == "Python":
- formatter = MallardFormatterPython()
- elif options.language == "C":
- formatter = MallardFormatterC()
- else:
- raise SystemExit("Unsupported language: %s" % (options.language, ))
- writer = MallardWriter(formatter)
+ if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+ top_srcdir = os.environ['UNINSTALLED_INTROSPECTION_SRCDIR']
+ top_builddir = os.environ['UNINSTALLED_INTROSPECTION_BUILDDIR']
+ extra_include_dirs = [os.path.join(top_srcdir, 'gir'), top_builddir]
else:
- raise SystemExit("Unsupported output format: %s" % (options.format, ))
-
- generator = GIDocGenerator()
- generator.parse(args[1])
+ extra_include_dirs = []
+ transformer = Transformer.parse_from_gir(args[1], extra_include_dirs)
- generator.generate(writer, options.output)
+ writer = MallardWriter(transformer, options.language)
+ writer.write(options.output)
return 0
diff -Nru gobject-introspection-1.31.10/giscanner/girparser.py gobject-introspection-1.31.20/giscanner/girparser.py
--- gobject-introspection-1.31.10/giscanner/girparser.py 2011-09-14 14:32:12.000000000 +0000
+++ gobject-introspection-1.31.20/giscanner/girparser.py 2012-02-20 17:19:27.000000000 +0000
@@ -256,27 +256,27 @@
for iface in self._find_children(node, _corens('prerequisite')):
obj.prerequisites.append(self._namespace.type_from_name(iface.attrib['name']))
for func_node in self._find_children(node, _corens('function')):
- func = self._parse_function_common(func_node, ast.Function)
+ func = self._parse_function_common(func_node, ast.Function, obj)
obj.static_methods.append(func)
for method in self._find_children(node, _corens('method')):
- func = self._parse_function_common(method, ast.Function)
+ func = self._parse_function_common(method, ast.Function, obj)
func.is_method = True
obj.methods.append(func)
for method in self._find_children(node, _corens('virtual-method')):
- func = self._parse_function_common(method, ast.VFunction)
+ func = self._parse_function_common(method, ast.VFunction, obj)
self._parse_generic_attribs(method, func)
func.is_method = True
func.invoker = method.get('invoker')
obj.virtual_methods.append(func)
for ctor in self._find_children(node, _corens('constructor')):
- func = self._parse_function_common(ctor, ast.Function)
+ func = self._parse_function_common(ctor, ast.Function, obj)
func.is_constructor = True
obj.constructors.append(func)
obj.fields.extend(self._parse_fields(node))
for prop in self._find_children(node, _corens('property')):
- obj.properties.append(self._parse_property(prop))
+ obj.properties.append(self._parse_property(prop, obj))
for signal in self._find_children(node, _glibns('signal')):
- obj.signals.append(self._parse_function_common(signal, ast.Signal))
+ obj.signals.append(self._parse_function_common(signal, ast.Signal, obj))
def _parse_callback(self, node):
callback = self._parse_function_common(node, ast.Callback)
@@ -286,7 +286,7 @@
function = self._parse_function_common(node, ast.Function)
self._namespace.append(function)
- def _parse_function_common(self, node, klass):
+ def _parse_function_common(self, node, klass, parent=None):
name = node.attrib['name']
returnnode = node.find(_corens('return-value'))
if not returnnode:
@@ -319,6 +319,7 @@
func.shadows = node.attrib.get('shadows', None)
func.shadowed_by = node.attrib.get('shadowed-by', None)
func.moved_to = node.attrib.get('moved-to', None)
+ func.parent = parent
parameters_node = node.find(_corens('parameters'))
if (parameters_node is not None):
@@ -377,13 +378,13 @@
compound.fields.extend(self._parse_fields(node))
for method in self._find_children(node, _corens('method')):
compound.methods.append(
- self._parse_function_common(method, ast.Function))
+ self._parse_function_common(method, ast.Function, compound))
for func in self._find_children(node, _corens('function')):
compound.static_methods.append(
- self._parse_function_common(func, ast.Function))
+ self._parse_function_common(func, ast.Function, compound))
for ctor in self._find_children(node, _corens('constructor')):
compound.constructors.append(
- self._parse_function_common(ctor, ast.Function))
+ self._parse_function_common(ctor, ast.Function, compound))
return compound
def _parse_record(self, node, anonymous=False):
@@ -482,15 +483,15 @@
if self._types_only:
return
for method in self._find_children(node, _corens('method')):
- func = self._parse_function_common(method, ast.Function)
+ func = self._parse_function_common(method, ast.Function, obj)
func.is_method = True
obj.methods.append(func)
for ctor in self._find_children(node, _corens('constructor')):
obj.constructors.append(
- self._parse_function_common(ctor, ast.Function))
+ self._parse_function_common(ctor, ast.Function, obj))
for callback in self._find_children(node, _corens('callback')):
obj.fields.append(
- self._parse_function_common(callback, ast.Callback))
+ self._parse_function_common(callback, ast.Callback, obj))
def _parse_field(self, node):
type_node = None
@@ -521,7 +522,7 @@
self._parse_generic_attribs(node, field)
return field
- def _parse_property(self, node):
+ def _parse_property(self, node, parent):
prop = ast.Property(node.attrib['name'],
self._parse_type(node),
node.attrib.get('readable') != '0',
@@ -530,6 +531,7 @@
node.attrib.get('construct-only') == '1',
node.attrib.get('transfer-ownership'))
self._parse_generic_attribs(node, prop)
+ prop.parent = parent
return prop
def _parse_member(self, node):
diff -Nru gobject-introspection-1.31.10/giscanner/maintransformer.py gobject-introspection-1.31.20/giscanner/maintransformer.py
--- gobject-introspection-1.31.10/giscanner/maintransformer.py 2012-01-11 20:57:34.000000000 +0000
+++ gobject-introspection-1.31.20/giscanner/maintransformer.py 2012-02-16 16:24:41.000000000 +0000
@@ -684,33 +684,36 @@
self._apply_annotations_param_ret_common(parent, return_, tag)
def _apply_annotations_params(self, parent, params, block):
- allparams = []
+ declparams = set([])
if parent.instance_parameter:
- allparams.append(parent.instance_parameter.argname)
+ declparams.add(parent.instance_parameter.argname)
for param in params:
if block:
tag = block.get(param.argname)
else:
tag = None
self._apply_annotations_param(parent, param, tag)
- allparams.append(param.argname)
+ declparams.add(param.argname)
if not block:
return
- docparams = block.params[:]
- for doc_name in docparams:
- if doc_name in allparams:
- continue
+ docparams = set(block.params)
+
+ unknown = docparams - declparams
+ unused = declparams - docparams
+
+ for doc_name in unknown:
# Skip varargs, see #629759
if doc_name.lower() in ['...', 'varargs', TAG_RETURNS]:
continue
- if len(allparams) == 0:
+ if len(unused) == 0:
text = ''
- elif len(allparams) == 1:
- text = ', should be %r' % (allparams[0], )
+ elif len(unused) == 1:
+ (param, ) = unused
+ text = ', should be %r' % (param, )
else:
text = ', should be one of %s' % (
- ', '.join(repr(p) for p in allparams), )
+ ', '.join(repr(p) for p in unused), )
tag = block.get(doc_name)
message.warn(
@@ -1224,6 +1227,10 @@
vfunc = ast.VFunction.from_callback(callback)
vfunc.instance_parameter = callback.parameters[0]
vfunc.inherit_file_positions(callback)
+
+ prefix = self._get_annotation_name(class_struct)
+ block = self._blocks.get('%s::%s' % (prefix, vfunc.name))
+ self._apply_annotations_callable(vfunc, [node], block)
node.virtual_methods.append(vfunc)
# Take the set of virtual methods we found, and try
diff -Nru gobject-introspection-1.31.10/giscanner/mallard-C-class.tmpl gobject-introspection-1.31.20/giscanner/mallard-C-class.tmpl
--- gobject-introspection-1.31.10/giscanner/mallard-C-class.tmpl 1970-01-01 00:00:00.000000000 +0000
+++ gobject-introspection-1.31.20/giscanner/mallard-C-class.tmpl 2012-02-20 17:19:27.000000000 +0000
@@ -0,0 +1,48 @@
+
+
+
+
+
+ ${node.ctype}
+${formatter.format(node.doc)}
+% if node.version:
+