diff --git a/docs/reference/glib/tmpl/messages.sgml b/docs/reference/glib/tmpl/messages.sgml index 2c4e8d86d..245a775ee 100644 --- a/docs/reference/glib/tmpl/messages.sgml +++ b/docs/reference/glib/tmpl/messages.sgml @@ -117,15 +117,18 @@ documentation. @args: the parameters to insert into the format string. - + A convenience function/macro to log a normal message. +@format: +@Varargs: + @...: format string, followed by parameters to insert into the format string (as with printf()) - + A convenience function/macro to log a warning message. @@ -135,10 +138,13 @@ You can make warnings fatal at runtime by setting the %G_DEBUG environment variable (see Running GLib Applications). +@format: +@Varargs: + @...: format string, followed by parameters to insert into the format string (as with printf()) - + Logs a "critical warning" (#G_LOG_LEVEL_CRITICAL). It's more or less application-defined what constitutes a critical vs. a regular @@ -153,10 +159,13 @@ the %G_DEBUG environment variable (see Running GLib Applications). +@format: +@Varargs: + @...: format string, followed by parameters to insert into the format string (as with printf()) - + A convenience function/macro to log an error message. Error messages are always fatal, resulting in a call to @@ -166,16 +175,22 @@ expect. Using this function indicates a bug in your program, i.e. an assertion failure. +@format: +@Varargs: + @...: format string, followed by parameters to insert into the format string (as with printf()) - + A convenience function/macro to log a debug message. -@...: format string, followed by parameters to insert into the format string (as with printf()) +@format: +@Varargs: @Since: 2.6 + +@...: format string, followed by parameters to insert into the format string (as with printf()) diff --git a/gio/tests/gdbus-example-subtree.c b/gio/tests/gdbus-example-subtree.c index b037dd35d..cd3365f70 100644 --- a/gio/tests/gdbus-example-subtree.c +++ b/gio/tests/gdbus-example-subtree.c @@ -5,9 +5,9 @@ /* ---------------------------------------------------------------------------------------------------- */ static GDBusNodeInfo *introspection_data = NULL; -static const GDBusInterfaceInfo *manager_interface_info = NULL; -static const GDBusInterfaceInfo *block_interface_info = NULL; -static const GDBusInterfaceInfo *partition_interface_info = NULL; +static GDBusInterfaceInfo *manager_interface_info = NULL; +static GDBusInterfaceInfo *block_interface_info = NULL; +static GDBusInterfaceInfo *partition_interface_info = NULL; /* Introspection data for the service we are exporting */ static const gchar introspection_xml[] = @@ -253,7 +253,7 @@ subtree_enumerate (GDBusConnection *connection, return nodes; } -static GPtrArray * +static GDBusInterfaceInfo ** subtree_introspect (GDBusConnection *connection, const gchar *sender, const gchar *object_path, @@ -263,18 +263,21 @@ subtree_introspect (GDBusConnection *connection, GPtrArray *p; p = g_ptr_array_new (); - if (g_strcmp0 (node, "/") == 0) + if (node == NULL) { - g_ptr_array_add (p, (gpointer) manager_interface_info); + g_ptr_array_add (p, g_dbus_interface_info_ref (manager_interface_info)); } else { - g_ptr_array_add (p, (gpointer) block_interface_info); + g_ptr_array_add (p, g_dbus_interface_info_ref (block_interface_info)); if (strlen (node) == 4) - g_ptr_array_add (p, (gpointer) partition_interface_info); + g_ptr_array_add (p, + g_dbus_interface_info_ref (partition_interface_info)); } - return p; + g_ptr_array_add (p, NULL); + + return (GDBusInterfaceInfo **) g_ptr_array_free (p, FALSE); } static const GDBusInterfaceVTable *