From 6d0d9938e34df351615d644ea3d2fc667fa6a22f Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Wed, 23 Sep 2015 08:06:32 +0200 Subject: Update glib annotations from git master --- gir/gio-2.0.c | 28 ++++++++++++++-------------- gir/glib-2.0.c | 29 ++++++++++++++++++++--------- gir/gobject-2.0.c | 3 +++ 3 files changed, 37 insertions(+), 23 deletions(-) (limited to 'gir') diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c index fdcf9f84..0488eeef 100644 --- a/gir/gio-2.0.c +++ b/gir/gio-2.0.c @@ -6242,7 +6242,7 @@ * interface, in which case all objects in the list must implement it. * * The semantics are close to that of an array: - * g_list_model_get_length() returns the number of items in the list and + * g_list_model_get_n_items() returns the number of items in the list and * g_list_model_get_item() returns an item at a (0-based) position. In * order to allow implementations to calculate the list length lazily, * you can also iterate over items: starting from 0, repeatedly call @@ -28249,10 +28249,10 @@ /** * g_native_socket_address_new: - * @address: a #GNativeAddress - * @port: a port number + * @native: a native address object + * @len: the length of @native, in bytes * - * Creates a new #GNativeSocketAddress for @address and @port. + * Creates a new #GNativeSocketAddress for @native and @len. * * Returns: a new #GNativeSocketAddress * Since: 2.46 @@ -40350,7 +40350,7 @@ * @key: (in) (transfer none): a #GWin32RegistryKey * @watch_children: (in): %TRUE also watch the children of the @key, %FALSE * to watch the key only. - * @change_flags: (in): specifies the types of changes to watch for. + * @watch_flags: (in): specifies the types of changes to watch for. * @callback: (in) (nullable): a function to invoke when a change occurs. * @user_data: (in) (nullable): a pointer to pass to @callback on invocation. * @error: (nullable): a pointer to %NULL #GError, or %NULL @@ -40595,12 +40595,13 @@ /** * g_win32_registry_value_iter_get_data: * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR to + * G_WIN32_REGISTRY_VALUE_STR * @value_data: (out callee-allocates) (optional) (transfer none): Pointer to a - * location to store the data of the value (in UTF-8, if it's a string). + * location to store the data of the value (in UTF-8, if it's a string) * @value_data_size: (out) (optional): Pointer to a location to store the length - * of @value_data, in bytes (including any NUL-terminators, if it's a - * string). - * %NULL if length is not needed. + * of @value_data, in bytes (including any NUL-terminators, if it's a string). + * %NULL if length is not needed * @error: (nullable): a pointer to %NULL #GError, or %NULL * * Stores the data of the value currently being iterated over in @value_data, @@ -40615,12 +40616,11 @@ * g_win32_registry_value_iter_get_data_w: * @iter: (in) (transfer none): a #GWin32RegistryValueIter * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR to - * G_WIN32_REGISTRY_VALUE_STR. + * G_WIN32_REGISTRY_VALUE_STR * @value_data: (out callee-allocates) (optional) (transfer none): Pointer to a - * location to store the data of the value (in UTF-16, if it's a string). - * @value_data_len: (out) (optional): Pointer to a location to store the size - * of @value_data, in bytes (including any NUL-terminators, if it's a - * string). + * location to store the data of the value (in UTF-16, if it's a string) + * @value_data_size: (out) (optional): Pointer to a location to store the size + * of @value_data, in bytes (including any NUL-terminators, if it's a string). * %NULL if length is not needed. * @error: (nullable): a pointer to %NULL #GError, or %NULL * diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c index 09548157..0d5431bc 100644 --- a/gir/glib-2.0.c +++ b/gir/glib-2.0.c @@ -1883,6 +1883,14 @@ */ +/** + * GStrv: + * + * A typedef alias for gchar**. This is mostly useful when used together with + * g_auto(). + */ + + /** * GTestCase: * @@ -9332,9 +9340,9 @@ /** * g_async_queue_push_front: * @queue: a #GAsyncQueue - * @data: @data to push into the @queue + * @item: data to push into the @queue * - * Pushes the @data into the @queue. @data must not be %NULL. + * Pushes the @item into the @queue. @item must not be %NULL. * In contrast to g_async_queue_push(), this function * pushes the new item ahead of the items already in the queue, * so that it will be the next one to be popped off the queue. @@ -9346,9 +9354,9 @@ /** * g_async_queue_push_front_unlocked: * @queue: a #GAsyncQueue - * @data: @data to push into the @queue + * @item: data to push into the @queue * - * Pushes the @data into the @queue. @data must not be %NULL. + * Pushes the @item into the @queue. @item must not be %NULL. * In contrast to g_async_queue_push_unlocked(), this function * pushes the new item ahead of the items already in the queue, * so that it will be the next one to be popped off the queue. @@ -9445,7 +9453,7 @@ /** * g_async_queue_remove: * @queue: a #GAsyncQueue - * @data: the @data to remove from the @queue + * @item: the data to remove from the @queue * * Remove an item from the queue. * @@ -9457,7 +9465,7 @@ /** * g_async_queue_remove_unlocked: * @queue: a #GAsyncQueue - * @data: the @data to remove from the @queue + * @item: the data to remove from the @queue * * Remove an item from the queue. * @@ -10017,8 +10025,10 @@ * { * g_auto(GQueue) queue = G_QUEUE_INIT; * g_auto(GVariantBuilder) builder; + * g_auto(GStrv) strv; * * g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); + * strv = g_strsplit("a:b:c", ":", -1); * * ... * @@ -10096,9 +10106,8 @@ * gboolean * check_exists(GVariant *dict) * { - * g_autoptr(GVariant) dirname; - * g_autoptr(GVariant) basename = NULL; - * g_autoptr(gchar) path = NULL; + * g_autoptr(GVariant) dirname, basename = NULL; + * g_autofree gchar *path = NULL; * * dirname = g_variant_lookup_value (dict, "dirname", G_VARIANT_TYPE_STRING); * @@ -10122,6 +10131,8 @@ * initialiser or by ensuring that it is assigned to unconditionally * before it goes out of scope. * + * See also g_auto(), g_autofree() and g_steal_pointer(). + * * Since: 2.44 */ diff --git a/gir/gobject-2.0.c b/gir/gobject-2.0.c index 9302fa67..025266e6 100644 --- a/gir/gobject-2.0.c +++ b/gir/gobject-2.0.c @@ -4599,6 +4599,9 @@ * consistent with how a signal emitted with @detail would be delivered * to those handlers. * + * Since 2.46 this also checks for a non-default class closure being + * installed, as this is basically always what you want. + * * One example of when you might use this is when the arguments to the * signal are difficult to compute. A class implementor may opt to not * emit the signal if no one is attached anyway, thus saving the cost -- cgit v1.2.1