diff --git a/gio/gconverter.c b/gio/gconverter.c index c39700165..88b22c16b 100644 --- a/gio/gconverter.c +++ b/gio/gconverter.c @@ -55,7 +55,8 @@ g_converter_default_init (GConverterInterface *iface) * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer * containing the data to convert. * @inbuf_size: the number of bytes in @inbuf - * @outbuf: a buffer to write converted data in. + * @outbuf: (element-type guint8) (array length=outbuf_size): a buffer to write + * converted data in. * @outbuf_size: the number of bytes in @outbuf, must be at least one * @flags: a #GConverterFlags controlling the conversion details * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success diff --git a/gio/gcredentials.c b/gio/gcredentials.c index 6673afddd..6d6b92a77 100644 --- a/gio/gcredentials.c +++ b/gio/gcredentials.c @@ -393,7 +393,7 @@ g_credentials_get_native (GCredentials *credentials, * g_credentials_set_native: * @credentials: A #GCredentials. * @native_type: The type of native credentials to set. - * @native: A pointer to native credentials. + * @native: (not nullable): A pointer to native credentials. * * Copies the native credentials of type @native_type from @native * into @credentials. diff --git a/gio/gdbusconnection.h b/gio/gdbusconnection.h index 6876cd420..abc87779e 100644 --- a/gio/gdbusconnection.h +++ b/gio/gdbusconnection.h @@ -487,7 +487,7 @@ typedef GDBusInterfaceInfo ** (*GDBusSubtreeIntrospectFunc) (GDBusConnection * @object_path: The object path that was registered with g_dbus_connection_register_subtree(). * @interface_name: The D-Bus interface name that the method call or property access is for. * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree. - * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL). + * @out_user_data: (nullable) (not optional): Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL). * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree(). * * The type of the @dispatch function in #GDBusSubtreeVTable. diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c index 379850d49..771141686 100644 --- a/gio/gfileinfo.c +++ b/gio/gfileinfo.c @@ -711,9 +711,10 @@ g_file_info_remove_attribute (GFileInfo *info, * g_file_info_get_attribute_data: * @info: a #GFileInfo * @attribute: a file attribute key - * @type: (out) (allow-none): return location for the attribute type, or %NULL - * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL - * @status: (out) (allow-none): return location for the attribute status, or %NULL + * @type: (out) (optional): return location for the attribute type, or %NULL + * @value_pp: (out) (optional) (not nullable): return location for the + * attribute value, or %NULL; the attribute value will not be %NULL + * @status: (out) (optional): return location for the attribute status, or %NULL * * Gets the attribute type, value and status for an attribute key. * @@ -1108,7 +1109,7 @@ _g_file_info_set_attribute_by_id (GFileInfo *info, * @info: a #GFileInfo. * @attribute: a file attribute key. * @type: a #GFileAttributeType - * @value_p: pointer to the value + * @value_p: (not nullable): pointer to the value * * Sets the @attribute to contain the given value, if possible. To unset the * attribute, use %G_ATTRIBUTE_TYPE_INVALID for @type. diff --git a/gio/gicon.c b/gio/gicon.c index b5080dae2..6c9a3ec97 100644 --- a/gio/gicon.c +++ b/gio/gicon.c @@ -83,7 +83,7 @@ g_icon_default_init (GIconInterface *iface) /** * g_icon_hash: - * @icon: #gconstpointer to an icon object. + * @icon: (not nullable): #gconstpointer to an icon object. * * Gets a hash for an icon. * diff --git a/gio/gmemoryoutputstream.c b/gio/gmemoryoutputstream.c index a89701d60..90b558775 100644 --- a/gio/gmemoryoutputstream.c +++ b/gio/gmemoryoutputstream.c @@ -422,7 +422,8 @@ g_memory_output_stream_new_resizable (void) * Note that the returned pointer may become invalid on the next * write or truncate operation on the stream. * - * Returns: (transfer none): pointer to the stream's data + * Returns: (transfer none): pointer to the stream's data, or %NULL if the data + * has been stolen **/ gpointer g_memory_output_stream_get_data (GMemoryOutputStream *ostream) @@ -492,7 +493,8 @@ g_memory_output_stream_get_data_size (GMemoryOutputStream *ostream) * * @ostream must be closed before calling this function. * - * Returns: (transfer full): the stream's data + * Returns: (transfer full): the stream's data, or %NULL if it has previously + * been stolen * * Since: 2.26 **/ diff --git a/gio/gsocketaddress.c b/gio/gsocketaddress.c index cefd9e0fc..6f5c4958b 100644 --- a/gio/gsocketaddress.c +++ b/gio/gsocketaddress.c @@ -192,7 +192,7 @@ g_socket_address_to_native (GSocketAddress *address, /** * g_socket_address_new_from_native: - * @native: a pointer to a struct sockaddr + * @native: (not nullable): a pointer to a struct sockaddr * @len: the size of the memory location pointed to by @native * * Creates a #GSocketAddress subclass corresponding to the native diff --git a/gio/gsocketcontrolmessage.c b/gio/gsocketcontrolmessage.c index a526b4f76..c9c4cc634 100644 --- a/gio/gsocketcontrolmessage.c +++ b/gio/gsocketcontrolmessage.c @@ -118,7 +118,7 @@ g_socket_control_message_get_msg_type (GSocketControlMessage *message) /** * g_socket_control_message_serialize: * @message: a #GSocketControlMessage - * @data: A buffer to write data to + * @data: (not nullable): A buffer to write data to * * Converts the data in the message to bytes placed in the * message. diff --git a/glib/garray.c b/glib/garray.c index 8a94720f7..8c26f8711 100644 --- a/glib/garray.c +++ b/glib/garray.c @@ -385,7 +385,7 @@ array_free (GRealArray *array, /** * g_array_append_vals: * @array: a #GArray - * @data: a pointer to the elements to append to the end of the array + * @data: (not nullable): a pointer to the elements to append to the end of the array * @len: the number of elements to append * * Adds @len elements onto the end of the array. @@ -430,7 +430,7 @@ g_array_append_vals (GArray *farray, /** * g_array_prepend_vals: * @array: a #GArray - * @data: a pointer to the elements to prepend to the start of the array + * @data: (not nullable): a pointer to the elements to prepend to the start of the array * @len: the number of elements to prepend * * Adds @len elements onto the start of the array. @@ -486,7 +486,7 @@ g_array_prepend_vals (GArray *farray, * g_array_insert_vals: * @array: a #GArray * @index_: the index to place the elements at - * @data: a pointer to the elements to insert + * @data: (not nullable): a pointer to the elements to insert * @len: the number of elements to insert * * Inserts @len elements into a #GArray at the given index. diff --git a/glib/gatomic.c b/glib/gatomic.c index 3ca0e403b..e70e8095b 100644 --- a/glib/gatomic.c +++ b/glib/gatomic.c @@ -301,7 +301,7 @@ guint /** * g_atomic_pointer_get: - * @atomic: a pointer to a #gpointer-sized value + * @atomic: (not nullable): a pointer to a #gpointer-sized value * * Gets the current value of @atomic. * @@ -320,7 +320,7 @@ gpointer /** * g_atomic_pointer_set: - * @atomic: a pointer to a #gpointer-sized value + * @atomic: (not nullable): a pointer to a #gpointer-sized value * @newval: a new value to store * * Sets the value of @atomic to @newval. @@ -339,7 +339,7 @@ void /** * g_atomic_pointer_compare_and_exchange: - * @atomic: a pointer to a #gpointer-sized value + * @atomic: (not nullable): a pointer to a #gpointer-sized value * @oldval: the value to compare with * @newval: the value to conditionally replace with * @@ -368,7 +368,7 @@ gboolean /** * g_atomic_pointer_add: - * @atomic: a pointer to a #gpointer-sized value + * @atomic: (not nullable): a pointer to a #gpointer-sized value * @val: the value to add * * Atomically adds @val to the value of @atomic. @@ -391,7 +391,7 @@ gssize /** * g_atomic_pointer_and: - * @atomic: a pointer to a #gpointer-sized value + * @atomic: (not nullable): a pointer to a #gpointer-sized value * @val: the value to 'and' * * Performs an atomic bitwise 'and' of the value of @atomic and @val, @@ -415,7 +415,7 @@ gsize /** * g_atomic_pointer_or: - * @atomic: a pointer to a #gpointer-sized value + * @atomic: (not nullable): a pointer to a #gpointer-sized value * @val: the value to 'or' * * Performs an atomic bitwise 'or' of the value of @atomic and @val, @@ -439,7 +439,7 @@ gsize /** * g_atomic_pointer_xor: - * @atomic: a pointer to a #gpointer-sized value + * @atomic: (not nullable): a pointer to a #gpointer-sized value * @val: the value to 'xor' * * Performs an atomic bitwise 'xor' of the value of @atomic and @val, diff --git a/glib/gbitlock.c b/glib/gbitlock.c index b0b53504e..d5b4dac62 100644 --- a/glib/gbitlock.c +++ b/glib/gbitlock.c @@ -385,7 +385,7 @@ g_futex_int_address (const volatile void *address) /** * g_pointer_bit_lock: - * @address: a pointer to a #gpointer-sized value + * @address: (not nullable): a pointer to a #gpointer-sized value * @lock_bit: a bit value between 0 and 31 * * This is equivalent to g_bit_lock, but working on pointers (or other @@ -454,7 +454,7 @@ void /** * g_pointer_bit_trylock: - * @address: a pointer to a #gpointer-sized value + * @address: (not nullable): a pointer to a #gpointer-sized value * @lock_bit: a bit value between 0 and 31 * * This is equivalent to g_bit_trylock, but working on pointers (or @@ -501,7 +501,7 @@ gboolean /** * g_pointer_bit_unlock: - * @address: a pointer to a #gpointer-sized value + * @address: (not nullable): a pointer to a #gpointer-sized value * @lock_bit: a bit value between 0 and 31 * * This is equivalent to g_bit_unlock, but working on pointers (or other diff --git a/glib/gbytes.c b/glib/gbytes.c index a106adea5..b9ca4eb04 100644 --- a/glib/gbytes.c +++ b/glib/gbytes.c @@ -436,8 +436,9 @@ try_steal_and_unref (GBytes *bytes, * g_bytes_new_take() or g_byte_array_free_to_bytes(). In all other cases the * data is copied. * - * Returns: (transfer full) (array length=size) (element-type guint8): - * a pointer to the same byte data, which should be freed with g_free() + * Returns: (transfer full) (array length=size) (element-type guint8) + * (not nullable): a pointer to the same byte data, which should be + * freed with g_free() * * Since: 2.32 */ diff --git a/glib/gconvert.c b/glib/gconvert.c index 1d55fda13..11841c5cd 100644 --- a/glib/gconvert.c +++ b/glib/gconvert.c @@ -872,7 +872,7 @@ strdup_len (const gchar *string, * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) - * @bytes_read: location to store the number of bytes in the + * @bytes_read: (out) (optional): location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters @@ -880,8 +880,8 @@ strdup_len (const gchar *string, * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. - * @bytes_written: the number of bytes stored in the output buffer (not - * including the terminating nul). + * @bytes_written: (out) (optional): the number of bytes stored in the output + * buffer (not including the terminating nul). * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError may occur. * @@ -915,7 +915,7 @@ g_locale_to_utf8 (const gchar *opsysstring, * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) - * @bytes_read: location to store the number of bytes in the + * @bytes_read: (out) (optional): location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters @@ -923,8 +923,8 @@ g_locale_to_utf8 (const gchar *opsysstring, * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. - * @bytes_written: the number of bytes stored in the output buffer (not - * including the terminating nul). + * @bytes_written: (out) (optional): the number of bytes stored in the output + * buffer (not including the terminating nul). * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError may occur. * @@ -1119,7 +1119,7 @@ get_filename_charset (const gchar **filename_charset) * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) - * @bytes_read: location to store the number of bytes in the + * @bytes_read: (out) (optional): location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters @@ -1127,8 +1127,8 @@ get_filename_charset (const gchar **filename_charset) * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. - * @bytes_written: the number of bytes stored in the output buffer (not - * including the terminating nul). + * @bytes_written: (out) (optional): the number of bytes stored in the output + * buffer (not including the terminating nul). * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError may occur. * @@ -1191,7 +1191,7 @@ g_filename_to_utf8 (const gchar *opsysstring, * @utf8string: a UTF-8 encoded string. * @len: the length of the string, or -1 if the string is * nul-terminated. - * @bytes_read: (out) (allow-none): location to store the number of bytes in + * @bytes_read: (out) (optional): location to store the number of bytes in * the input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters @@ -1530,7 +1530,8 @@ hostname_validate (const char *hostname) /** * g_filename_from_uri: * @uri: a uri describing a filename (escaped, encoded in ASCII). - * @hostname: (out) (allow-none): Location to store hostname for the URI, or %NULL. + * @hostname: (out) (optional) (nullable): Location to store hostname for the + * URI. * If there is no hostname in the URI, %NULL will be * stored in this location. * @error: location to store the error occurring, or %NULL to ignore diff --git a/glib/gdataset.c b/glib/gdataset.c index 71aaa8eae..4f00d990f 100644 --- a/glib/gdataset.c +++ b/glib/gdataset.c @@ -318,7 +318,7 @@ g_dataset_destroy_internal (GDataset *dataset) /** * g_dataset_destroy: - * @dataset_location: the location identifying the dataset. + * @dataset_location: (not nullable): the location identifying the dataset. * * Destroys the dataset, freeing all memory allocated, and calling any * destroy functions set for data elements. @@ -487,7 +487,7 @@ g_data_set_internal (GData **datalist, /** * g_dataset_id_set_data_full: - * @dataset_location: the location identifying the dataset. + * @dataset_location: (not nullable): the location identifying the dataset. * @key_id: the #GQuark id to identify the data element. * @data: the data element. * @destroy_func: the function to call when the data element is @@ -672,7 +672,7 @@ g_datalist_id_set_data_full (GData **datalist, /** * g_dataset_id_remove_no_notify: - * @dataset_location: the location identifying the dataset. + * @dataset_location: (not nullable): the location identifying the dataset. * @key_id: the #GQuark ID identifying the data element. * * Removes an element, without calling its destroy notification @@ -742,7 +742,7 @@ g_datalist_id_remove_no_notify (GData **datalist, /** * g_dataset_id_get_data: - * @dataset_location: the location identifying the dataset. + * @dataset_location: (not nullable): the location identifying the dataset. * @key_id: the #GQuark id to identify the data element. * * Gets the data element corresponding to a #GQuark. @@ -1054,7 +1054,7 @@ g_datalist_get_data (GData **datalist, /** * g_dataset_foreach: - * @dataset_location: the location identifying the dataset. + * @dataset_location: (not nullable): the location identifying the dataset. * @func: the function to call for each data element. * @user_data: user data to pass to the function. * diff --git a/glib/gdate.c b/glib/gdate.c index 2e4d52f1c..4aece02dd 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -1938,7 +1938,7 @@ g_date_compare (const GDate *lhs, /** * g_date_to_struct_tm: * @date: a #GDate to set the struct tm from - * @tm: struct tm to fill + * @tm: (not nullable): struct tm to fill * * Fills in the date-related bits of a struct tm using the @date value. * Initializes the non-date parts with something sane but meaningless. diff --git a/glib/gdatetime.c b/glib/gdatetime.c index df2dc26ac..ebc4837c7 100644 --- a/glib/gdatetime.c +++ b/glib/gdatetime.c @@ -1363,8 +1363,8 @@ g_date_time_add_full (GDateTime *datetime, /* Compare, difference, hash, equal {{{1 */ /** * g_date_time_compare: - * @dt1: first #GDateTime to compare - * @dt2: second #GDateTime to compare + * @dt1: (not nullable): first #GDateTime to compare + * @dt2: (not nullable): second #GDateTime to compare * * A comparison function for #GDateTimes that is suitable * as a #GCompareFunc. Both #GDateTimes must be non-%NULL. @@ -1419,7 +1419,7 @@ g_date_time_difference (GDateTime *end, /** * g_date_time_hash: - * @datetime: a #GDateTime + * @datetime: (not nullable): a #GDateTime * * Hashes @datetime into a #guint, suitable for use within #GHashTable. * @@ -1435,8 +1435,8 @@ g_date_time_hash (gconstpointer datetime) /** * g_date_time_equal: - * @dt1: a #GDateTime - * @dt2: a #GDateTime + * @dt1: (not nullable): a #GDateTime + * @dt2: (not nullable): a #GDateTime * * Checks to see if @dt1 and @dt2 are equal. * diff --git a/glib/gerror.c b/glib/gerror.c index 9263ce939..4d5c60bce 100644 --- a/glib/gerror.c +++ b/glib/gerror.c @@ -525,7 +525,7 @@ g_error_copy (const GError *error) /** * g_error_matches: - * @error: (allow-none): a #GError or %NULL + * @error: (nullable): a #GError * @domain: an error domain * @code: an error code * @@ -558,7 +558,7 @@ g_error_matches (const GError *error, /** * g_set_error: - * @err: (allow-none): a return location for a #GError, or %NULL + * @err: (out callee-allocates) (optional): a return location for a #GError * @domain: error domain * @code: error code * @format: printf()-style format @@ -596,7 +596,7 @@ g_set_error (GError **err, /** * g_set_error_literal: - * @err: (allow-none): a return location for a #GError, or %NULL + * @err: (out callee-allocates) (optional): a return location for a #GError * @domain: error domain * @code: error code * @message: error message @@ -697,7 +697,7 @@ g_error_add_prefix (gchar **string, /** * g_prefix_error: - * @err: (allow-none): a return location for a #GError, or %NULL + * @err: (inout) (optional) (nullable): a return location for a #GError * @format: printf()-style format string * @...: arguments to @format * diff --git a/glib/ghash.c b/glib/ghash.c index 7f8e5dab0..f33fa275a 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -767,8 +767,8 @@ g_hash_table_iter_init (GHashTableIter *iter, /** * g_hash_table_iter_next: * @iter: an initialized #GHashTableIter - * @key: (allow-none): a location to store the key, or %NULL - * @value: (allow-none): a location to store the value, or %NULL + * @key: (out) (optional): a location to store the key + * @value: (out) (nullable) (optional): a location to store the value * * Advances @iter and retrieves the key and/or value that are now * pointed to as a result of this advancement. If %FALSE is returned, @@ -1155,8 +1155,9 @@ g_hash_table_lookup (GHashTable *hash_table, * g_hash_table_lookup_extended: * @hash_table: a #GHashTable * @lookup_key: the key to look up - * @orig_key: (allow-none): return location for the original key, or %NULL - * @value: (allow-none): return location for the value associated with the key, or %NULL + * @orig_key: (allow-none): return location for the original key + * @value: (out) (optional) (nullable): return location for the value associated + * with the key * * Looks up a key in the #GHashTable, returning the original key and the * associated value and a #gboolean which is %TRUE if the key was found. This @@ -1821,8 +1822,8 @@ g_hash_table_get_values (GHashTable *hash_table) /** * g_str_equal: - * @v1: a key - * @v2: a key to compare with @v1 + * @v1: (not nullable): a key + * @v2: (not nullable): a key to compare with @v1 * * Compares two strings for byte-by-byte equality and returns %TRUE * if they are equal. It can be passed to g_hash_table_new() as the @@ -1847,7 +1848,7 @@ g_str_equal (gconstpointer v1, /** * g_str_hash: - * @v: a string key + * @v: (not nullable): a string key * * Converts a string to a hash value. * @@ -1922,8 +1923,8 @@ g_direct_equal (gconstpointer v1, /** * g_int_equal: - * @v1: a pointer to a #gint key - * @v2: a pointer to a #gint key to compare with @v1 + * @v1: (not nullable): a pointer to a #gint key + * @v2: (not nullable): a pointer to a #gint key to compare with @v1 * * Compares the two #gint values being pointed to and returns * %TRUE if they are equal. @@ -1946,7 +1947,7 @@ g_int_equal (gconstpointer v1, /** * g_int_hash: - * @v: a pointer to a #gint key + * @v: (not nullable): a pointer to a #gint key * * Converts a pointer to a #gint to a hash value. * It can be passed to g_hash_table_new() as the @hash_func parameter, @@ -1966,8 +1967,8 @@ g_int_hash (gconstpointer v) /** * g_int64_equal: - * @v1: a pointer to a #gint64 key - * @v2: a pointer to a #gint64 key to compare with @v1 + * @v1: (not nullable): a pointer to a #gint64 key + * @v2: (not nullable): a pointer to a #gint64 key to compare with @v1 * * Compares the two #gint64 values being pointed to and returns * %TRUE if they are equal. @@ -1988,7 +1989,7 @@ g_int64_equal (gconstpointer v1, /** * g_int64_hash: - * @v: a pointer to a #gint64 key + * @v: (not nullable): a pointer to a #gint64 key * * Converts a pointer to a #gint64 to a hash value. * @@ -2008,8 +2009,8 @@ g_int64_hash (gconstpointer v) /** * g_double_equal: - * @v1: a pointer to a #gdouble key - * @v2: a pointer to a #gdouble key to compare with @v1 + * @v1: (not nullable): a pointer to a #gdouble key + * @v2: (not nullable): a pointer to a #gdouble key to compare with @v1 * * Compares the two #gdouble values being pointed to and returns * %TRUE if they are equal. @@ -2030,7 +2031,7 @@ g_double_equal (gconstpointer v1, /** * g_double_hash: - * @v: a pointer to a #gdouble key + * @v: (not nullable): a pointer to a #gdouble key * * Converts a pointer to a #gdouble to a hash value. * It can be passed to g_hash_table_new() as the @hash_func parameter, diff --git a/glib/ghook.c b/glib/ghook.c index 44a2665e5..588f45154 100644 --- a/glib/ghook.c +++ b/glib/ghook.c @@ -453,7 +453,7 @@ g_hook_prepend (GHookList *hook_list, /** * g_hook_insert_before: * @hook_list: a #GHookList - * @sibling: the #GHook to insert the new #GHook before + * @sibling: (nullable): the #GHook to insert the new #GHook before * @hook: the #GHook to insert * * Inserts a #GHook into a #GHookList, before a given #GHook. @@ -930,7 +930,7 @@ g_hook_find_func (GHookList *hook_list, * @hook_list: a #GHookList * @need_valids: %TRUE if #GHook elements which have been destroyed * should be skipped - * @func: the function to find + * @func: (not nullable): the function to find * @data: the data to find * * Finds a #GHook in a #GHookList with the given function and data. diff --git a/glib/gmain.c b/glib/gmain.c index f680335cd..29ccee048 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -2361,7 +2361,7 @@ g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, * * As the name suggests, this function is not available on Windows. * - * Returns: an opaque tag + * Returns: (not nullable): an opaque tag * * Since: 2.36 **/ @@ -2401,7 +2401,7 @@ g_source_add_unix_fd (GSource *source, /** * g_source_modify_unix_fd: * @source: a #GSource - * @tag: the tag from g_source_add_unix_fd() + * @tag: (not nullable): the tag from g_source_add_unix_fd() * @new_events: the new event mask to watch * * Updates the event mask to watch for the fd identified by @tag. @@ -2441,7 +2441,7 @@ g_source_modify_unix_fd (GSource *source, /** * g_source_remove_unix_fd: * @source: a #GSource - * @tag: the tag from g_source_add_unix_fd() + * @tag: (not nullable): the tag from g_source_add_unix_fd() * * Reverses the effect of a previous call to g_source_add_unix_fd(). * @@ -2488,7 +2488,7 @@ g_source_remove_unix_fd (GSource *source, /** * g_source_query_unix_fd: * @source: a #GSource - * @tag: the tag from g_source_add_unix_fd() + * @tag: (not nullable): the tag from g_source_add_unix_fd() * * Queries the events reported for the fd corresponding to @tag on * @source during the last poll. diff --git a/glib/gmem.c b/glib/gmem.c index 7595ec0b2..e51f0cd13 100644 --- a/glib/gmem.c +++ b/glib/gmem.c @@ -192,7 +192,8 @@ g_free (gpointer mem) /** * g_clear_pointer: (skip) - * @pp: a pointer to a variable, struct member etc. holding a pointer + * @pp: (not nullable): a pointer to a variable, struct member etc. holding a + * pointer * @destroy: a function to which a gpointer can be passed, to destroy *@pp * * Clears a reference to a variable. diff --git a/glib/gmem.h b/glib/gmem.h index c16e812c4..835624bfb 100644 --- a/glib/gmem.h +++ b/glib/gmem.h @@ -129,7 +129,7 @@ gpointer g_try_realloc_n (gpointer mem, /** * g_steal_pointer: - * @pp: a pointer to a pointer + * @pp: (not nullable): a pointer to a pointer * * Sets @pp to %NULL, returning the value that was there before. * diff --git a/glib/gmessages.c b/glib/gmessages.c index c2eeb3829..87a7e6579 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -942,7 +942,8 @@ static GSList *expected_messages = NULL; /** * g_logv: - * @log_domain: the log domain + * @log_domain: (nullable): the log domain, or %NULL for the default "" + * application domain * @log_level: the log level * @format: the message format. See the printf() documentation * @args: the parameters to insert into the format string @@ -1089,7 +1090,8 @@ g_logv (const gchar *log_domain, /** * g_log: - * @log_domain: the log domain, usually #G_LOG_DOMAIN + * @log_domain: (nullable): the log domain, usually #G_LOG_DOMAIN, or %NULL + * for the default * @log_level: the log level, either from #GLogLevelFlags * or a user-defined level * @format: the message format. See the printf() documentation @@ -1117,6 +1119,12 @@ g_log (const gchar *log_domain, va_end (args); } +/** + * g_return_if_fail_warning: (skip) + * @log_domain: (nullable): + * @pretty_function: + * @expression: (nullable): + */ void g_return_if_fail_warning (const char *log_domain, const char *pretty_function, @@ -1129,6 +1137,14 @@ g_return_if_fail_warning (const char *log_domain, expression); } +/** + * g_warn_message: (skip) + * @domain: (nullable): + * @file: + * @line: + * @func: + * @warnexpr: (nullable): + */ void g_warn_message (const char *domain, const char *file, @@ -1379,10 +1395,11 @@ escape_string (GString *string) /** * g_log_default_handler: - * @log_domain: the log domain of the message + * @log_domain: (nullable): the log domain of the message, or %NULL for the + * default "" application domain * @log_level: the level of the message - * @message: the message - * @unused_data: data passed from g_log() which is unused + * @message: (nullable): the message + * @unused_data: (nullable): data passed from g_log() which is unused * * The default log handler set up by GLib; g_log_set_default_handler() * allows to install an alternate default log handler. diff --git a/glib/gnode.h b/glib/gnode.h index 763ac909f..50ad1bdf3 100644 --- a/glib/gnode.h +++ b/glib/gnode.h @@ -62,13 +62,13 @@ typedef void (*GNodeForeachFunc) (GNode *node, /** * GCopyFunc: - * @src: A pointer to the data which should be copied + * @src: (not nullable): A pointer to the data which should be copied * @data: Additional data * * A function of this signature is used to copy the node data * when doing a deep-copy of a tree. * - * Returns: A pointer to the copy + * Returns: (not nullable): A pointer to the copy * * Since: 2.4 */ diff --git a/glib/gprintf.c b/glib/gprintf.c index 1c831b04e..71b33225f 100644 --- a/glib/gprintf.c +++ b/glib/gprintf.c @@ -58,7 +58,7 @@ g_printf (gchar const *format, /** * g_fprintf: - * @file: the stream to write to. + * @file: (not nullable): the stream to write to. * @format: a standard printf() format string, but notice * [string precision pitfalls][string-precision] * @...: the arguments to insert in the output. @@ -191,7 +191,7 @@ g_vprintf (gchar const *format, /** * g_vfprintf: - * @file: the stream to write to. + * @file: (not nullable): the stream to write to. * @format: a standard printf() format string, but notice * [string precision pitfalls][string-precision] * @args: the list of arguments to insert in the output. diff --git a/glib/gqsort.c b/glib/gqsort.c index e63264ea4..27347bffe 100644 --- a/glib/gqsort.c +++ b/glib/gqsort.c @@ -282,7 +282,7 @@ msort_r (void *b, size_t n, size_t s, GCompareDataFunc cmp, void *arg) /** * g_qsort_with_data: - * @pbase: start of array to sort + * @pbase: (not nullable): start of array to sort * @total_elems: elements in the array * @size: size of each element * @compare_func: function to compare elements diff --git a/glib/gshell.c b/glib/gshell.c index a1c7e791f..2c50af8f3 100644 --- a/glib/gshell.c +++ b/glib/gshell.c @@ -619,10 +619,10 @@ tokenize_command_line (const gchar *command_line, /** * g_shell_parse_argv: * @command_line: command line to parse - * @argcp: (out) (optional): return location for number of args, or %NULL + * @argcp: (out) (optional): return location for number of args * @argvp: (out) (optional) (array length=argcp zero-terminated=1): return - * location for array of args, or %NULL - * @error: (optional): return location for error, or %NULL + * location for array of args + * @error: (optional): return location for error * * Parses a command line into an argument vector, in much the same way * the shell would, but without many of the expansions the shell would diff --git a/glib/gslice.c b/glib/gslice.c index 0563d8092..9022062ac 100644 --- a/glib/gslice.c +++ b/glib/gslice.c @@ -873,7 +873,11 @@ thread_memory_magazine2_free (ThreadMemory *tmem, * mechanism can be changed with the [`G_SLICE=always-malloc`][G_SLICE] * environment variable. * - * Returns: a pointer to the allocated block, cast to a pointer to @type + * This can never return %NULL as the minimum allocation size from + * `sizeof (@type)` is 1 byte. + * + * Returns: (not nullable): a pointer to the allocated block, cast to a pointer + * to @type * * Since: 2.10 */ @@ -892,13 +896,19 @@ thread_memory_magazine2_free (ThreadMemory *tmem, * be changed with the [`G_SLICE=always-malloc`][G_SLICE] * environment variable. * + * This can never return %NULL as the minimum allocation size from + * `sizeof (@type)` is 1 byte. + * + * Returns: (not nullable): a pointer to the allocated block, cast to a pointer + * to @type + * * Since: 2.10 */ /** * g_slice_dup: * @type: the type to duplicate, typically a structure name - * @mem: the memory to copy into the allocated block + * @mem: (not nullable): the memory to copy into the allocated block * * A convenience macro to duplicate a block of memory using * the slice allocator. @@ -910,7 +920,10 @@ thread_memory_magazine2_free (ThreadMemory *tmem, * be changed with the [`G_SLICE=always-malloc`][G_SLICE] * environment variable. * - * Returns: a pointer to the allocated block, cast to a pointer to @type + * This can never return %NULL. + * + * Returns: (not nullable): a pointer to the allocated block, cast to a pointer + * to @type * * Since: 2.14 */ @@ -929,6 +942,8 @@ thread_memory_magazine2_free (ThreadMemory *tmem, * [`G_DEBUG=gc-friendly`][G_DEBUG] environment variable, also see * [`G_SLICE`][G_SLICE] for related debugging options. * + * If @mem is %NULL, this macro does nothing. + * * Since: 2.10 */ @@ -947,6 +962,8 @@ thread_memory_magazine2_free (ThreadMemory *tmem, * [`G_DEBUG=gc-friendly`][G_DEBUG] environment variable, also see * [`G_SLICE`][G_SLICE] for related debugging options. * + * If @mem_chain is %NULL, this function does nothing. + * * Since: 2.10 */ @@ -964,7 +981,8 @@ thread_memory_magazine2_free (ThreadMemory *tmem, * be changed with the [`G_SLICE=always-malloc`][G_SLICE] * environment variable. * - * Returns: a pointer to the allocated memory block + * Returns: a pointer to the allocated memory block, which will be %NULL if and + * only if @mem_size is 0 * * Since: 2.10 */ @@ -1022,7 +1040,8 @@ g_slice_alloc (gsize mem_size) * mechanism can be changed with the [`G_SLICE=always-malloc`][G_SLICE] * environment variable. * - * Returns: a pointer to the allocated block + * Returns: a pointer to the allocated block, which will be %NULL if and only + * if @mem_size is 0 * * Since: 2.10 */ @@ -1043,7 +1062,10 @@ g_slice_alloc0 (gsize mem_size) * Allocates a block of memory from the slice allocator * and copies @block_size bytes into it from @mem_block. * - * Returns: a pointer to the allocated memory block + * @mem_block must be non-%NULL if @block_size is non-zero. + * + * Returns: a pointer to the allocated memory block, which will be %NULL if and + * only if @mem_size is 0 * * Since: 2.14 */ @@ -1070,6 +1092,8 @@ g_slice_copy (gsize mem_size, * can be changed with the [`G_DEBUG=gc-friendly`][G_DEBUG] environment * variable, also see [`G_SLICE`][G_SLICE] for related debugging options. * + * If @mem_block is %NULL, this function does nothing. + * * Since: 2.10 */ void @@ -1130,6 +1154,8 @@ g_slice_free1 (gsize mem_size, * [`G_DEBUG=gc-friendly`][G_DEBUG] environment variable, also see * [`G_SLICE`][G_SLICE] for related debugging options. * + * If @mem_chain is %NULL, this function does nothing. + * * Since: 2.10 */ void diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index 46c5d0608..b5a862b9a 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -343,7 +343,7 @@ get_C_locale (void) /** * g_strdup: - * @str: the string to duplicate + * @str: (nullable): the string to duplicate * * Duplicates a string. If @str is %NULL it returns %NULL. * The returned string should be freed with g_free() @@ -2114,7 +2114,7 @@ out: /** * g_strescape: * @source: a string to escape - * @exceptions: a string of characters not to escape in @source + * @exceptions: (nullable): a string of characters not to escape in @source * * Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\' * and '"' in the string @source by inserting a '\' before @@ -2467,7 +2467,7 @@ g_strsplit_set (const gchar *string, /** * g_strfreev: - * @str_array: a %NULL-terminated array of strings to free + * @str_array: (nullable): a %NULL-terminated array of strings to free * * Frees a %NULL-terminated array of strings, as well as each * string it contains. @@ -2490,14 +2490,14 @@ g_strfreev (gchar **str_array) /** * g_strdupv: - * @str_array: a %NULL-terminated array of strings + * @str_array: (nullable): a %NULL-terminated array of strings * * Copies %NULL-terminated array of strings. The copy is a deep copy; * the new array should be freed by first freeing each string, then * the array itself. g_strfreev() does this for you. If called * on a %NULL value, g_strdupv() simply returns %NULL. * - * Returns: a new %NULL-terminated array of strings. + * Returns: (nullable): a new %NULL-terminated array of strings. */ gchar** g_strdupv (gchar **str_array) diff --git a/glib/gstring.c b/glib/gstring.c index 155b426c7..e0f3ba1f0 100644 --- a/glib/gstring.c +++ b/glib/gstring.c @@ -132,8 +132,8 @@ g_string_sized_new (gsize dfl_size) /** * g_string_new: - * @init: (allow-none): the initial text to copy into the string, or %NULL to - * start with an empty string. + * @init: (nullable): the initial text to copy into the string, or %NULL to + * start with an empty string * * Creates a new #GString, initialized with the given string. * diff --git a/glib/gtestutils.c b/glib/gtestutils.c index ac4c196e3..79fb68fad 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -1681,7 +1681,7 @@ find_case (gconstpointer l, gconstpointer s) /** * GTestFixtureFunc: - * @fixture: the test fixture + * @fixture: (not nullable): the test fixture * @user_data: the data provided when registering the test * * The type used for functions that operate on test fixtures. This is @@ -2429,6 +2429,14 @@ g_assertion_message (const char *domain, abort (); } +/** + * g_assertion_message_expr: (skip) + * @domain: (nullable): + * @file: + * @line: + * @func: + * @expr: (nullable): + */ void g_assertion_message_expr (const char *domain, const char *file, diff --git a/glib/gthread.c b/glib/gthread.c index 758182977..b9ae4dfa5 100644 --- a/glib/gthread.c +++ b/glib/gthread.c @@ -615,7 +615,8 @@ g_once_impl (GOnce *once, /** * g_once_init_enter: - * @location: location of a static initializable variable containing 0 + * @location: (not nullable): location of a static initializable variable + * containing 0 * * Function to be called when starting a critical initialization * section. The argument @location must point to a static @@ -669,7 +670,8 @@ gboolean /** * g_once_init_leave: - * @location: location of a static initializable variable containing 0 + * @location: (not nullable): location of a static initializable variable + * containing 0 * @result: new non-0 value for *@value_location * * Counterpart to g_once_init_enter(). Expects a location of a static diff --git a/glib/gtrashstack.c b/glib/gtrashstack.c index 896ed6f6d..5c3b317c9 100644 --- a/glib/gtrashstack.c +++ b/glib/gtrashstack.c @@ -51,7 +51,7 @@ /** * g_trash_stack_push: * @stack_p: a #GTrashStack - * @data_p: the piece of memory to push on the stack + * @data_p: (not nullable): the piece of memory to push on the stack * * Pushes a piece of memory onto a #GTrashStack. */ diff --git a/glib/gtree.c b/glib/gtree.c index 7fb41c24f..6978d06ed 100644 --- a/glib/gtree.c +++ b/glib/gtree.c @@ -853,8 +853,8 @@ g_tree_lookup (GTree *tree, * g_tree_lookup_extended: * @tree: a #GTree * @lookup_key: the key to look up - * @orig_key: returns the original key - * @value: returns the value associated with the key + * @orig_key: (optional) (nullable): returns the original key + * @value: (optional) (nullable): returns the value associated with the key * * Looks up a key in the #GTree, returning the original key and the * associated value. This is useful if you need to free the memory diff --git a/glib/gutf8.c b/glib/gutf8.c index 4675800a0..e424c1057 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -153,7 +153,7 @@ g_utf8_find_prev_char (const char *str, /** * g_utf8_find_next_char: * @p: a pointer to a position within a UTF-8 encoded string - * @end: a pointer to the byte following the end of the string, + * @end: (nullable): a pointer to the byte following the end of the string, * or %NULL to indicate that the string is nul-terminated * * Finds the start of the next UTF-8 character in the string after @p. @@ -436,9 +436,9 @@ g_utf8_strncpy (gchar *dest, /** * g_unichar_to_utf8: * @c: a Unicode character code - * @outbuf: output buffer, must have at least 6 bytes of space. - * If %NULL, the length will be computed and returned - * and nothing will be written to @outbuf. + * @outbuf: (out caller-allocates) (optional): output buffer, must have at + * least 6 bytes of space. If %NULL, the length will be computed and + * returned and nothing will be written to @outbuf. * * Converts a single character to UTF-8. * @@ -684,8 +684,8 @@ g_utf8_get_char_validated (const gchar *p, * @str: a UTF-8 encoded string * @len: the maximum length of @str to use, in bytes. If @len < 0, * then the string is nul-terminated. - * @items_written: (allow-none): location to store the number of - * characters in the result, or %NULL. + * @items_written: (out caller-allocates) (optional): location to store the + * number of characters in the result, or %NULL. * * Convert a string from UTF-8 to a 32-bit fixed width * representation as UCS-4, assuming valid UTF-8 input. @@ -801,14 +801,15 @@ try_malloc_n (gsize n_blocks, gsize n_block_bytes, GError **error) * @str: a UTF-8 encoded string * @len: the maximum length of @str to use, in bytes. If @len < 0, * then the string is nul-terminated. - * @items_read: (allow-none): location to store number of bytes read, or %NULL. + * @items_read: (out caller-allocates) (optional): location to store number of + * bytes read, or %NULL. * If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be * returned in case @str contains a trailing partial * character. If an error occurs then the index of the * invalid input is stored here. - * @items_written: (allow-none): location to store number of characters - * written or %NULL. The value here stored does not include the - * trailing 0 character. + * @items_written: (out caller-allocates) (optional): location to store number + * of characters written or %NULL. The value here stored does not include + * the trailing 0 character. * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError other than * %G_CONVERT_ERROR_NO_CONVERSION may occur. @@ -886,11 +887,11 @@ g_utf8_to_ucs4 (const gchar *str, * @str: a UCS-4 encoded string * @len: the maximum length (number of characters) of @str to use. * If @len < 0, then the string is nul-terminated. - * @items_read: (allow-none): location to store number of characters - * read, or %NULL. - * @items_written: (allow-none): location to store number of bytes - * written or %NULL. The value here stored does not include the - * trailing 0 byte. + * @items_read: (out caller-allocates) (optional): location to store number of + * characters read, or %NULL. + * @items_written: (out caller-allocates) (optioanl): location to store number + * of bytes written or %NULL. The value here stored does not include the + * trailing 0 byte. * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError other than * %G_CONVERT_ERROR_NO_CONVERSION may occur. @@ -960,12 +961,13 @@ g_ucs4_to_utf8 (const gunichar *str, * @str: a UTF-16 encoded string * @len: the maximum length (number of #gunichar2) of @str to use. * If @len < 0, then the string is nul-terminated. - * @items_read: (allow-none): location to store number of words read, - * or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be - * returned in case @str contains a trailing partial character. If + * @items_read: (out caller-allocates) (optional): location to store number of + * words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will + * be returned in case @str contains a trailing partial character. If * an error occurs then the index of the invalid input is stored here. - * @items_written: (allow-none): location to store number of bytes written, - * or %NULL. The value stored here does not include the trailing 0 byte. + * @items_written: (out caller-allocates) (optional): location to store number + * of bytes written, or %NULL. The value stored here does not include the + * trailing 0 byte. * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError other than * %G_CONVERT_ERROR_NO_CONVERSION may occur. @@ -1114,13 +1116,13 @@ g_utf16_to_utf8 (const gunichar2 *str, * @str: a UTF-16 encoded string * @len: the maximum length (number of #gunichar2) of @str to use. * If @len < 0, then the string is nul-terminated. - * @items_read: (allow-none): location to store number of words read, - * or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be - * returned in case @str contains a trailing partial character. If + * @items_read: (out caller-allocates) (optional): location to store number of + * words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will + * be returned in case @str contains a trailing partial character. If * an error occurs then the index of the invalid input is stored here. - * @items_written: (allow-none): location to store number of characters - * written, or %NULL. The value stored here does not include the trailing - * 0 character. + * @items_written: (out caller-allocates) (optional): location to store number + * of characters written, or %NULL. The value stored here does not include + * the trailing 0 character. * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError other than * %G_CONVERT_ERROR_NO_CONVERSION may occur. @@ -1252,13 +1254,13 @@ g_utf16_to_ucs4 (const gunichar2 *str, * @str: a UTF-8 encoded string * @len: the maximum length (number of bytes) of @str to use. * If @len < 0, then the string is nul-terminated. - * @items_read: (allow-none): location to store number of bytes read, - * or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be - * returned in case @str contains a trailing partial character. If + * @items_read: (out caller-allocates) (optional): location to store number of + * bytes read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will + * be returned in case @str contains a trailing partial character. If * an error occurs then the index of the invalid input is stored here. - * @items_written: (allow-none): location to store number of #gunichar2 - * written, or %NULL. The value stored here does not include the - * trailing 0. + * @items_written: (out caller-allocates) (optional): location to store number + * of #gunichar2 written, or %NULL. The value stored here does not include + * the trailing 0. * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError other than * %G_CONVERT_ERROR_NO_CONVERSION may occur. @@ -1369,12 +1371,12 @@ g_utf8_to_utf16 (const gchar *str, * @str: a UCS-4 encoded string * @len: the maximum length (number of characters) of @str to use. * If @len < 0, then the string is nul-terminated. - * @items_read: (allow-none): location to store number of bytes read, - * or %NULL. If an error occurs then the index of the invalid input - * is stored here. - * @items_written: (allow-none): location to store number of #gunichar2 - * written, or %NULL. The value stored here does not include the - * trailing 0. + * @items_read: (out caller-allocates) (optional): location to store number of + * bytes read, or %NULL. If an error occurs then the index of the invalid + * input is stored here. + * @items_written: (out caller-allocates) (optional): location to store number + * of #gunichar2 written, or %NULL. The value stored here does not include + * the trailing 0. * @error: location to store the error occurring, or %NULL to ignore * errors. Any of the errors in #GConvertError other than * %G_CONVERT_ERROR_NO_CONVERSION may occur. diff --git a/glib/gutils.c b/glib/gutils.c index 360a4d5c8..d0711e3d2 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -2018,7 +2018,7 @@ g_get_system_config_dirs (void) /** * g_nullify_pointer: - * @nullify_location: the memory address of the pointer. + * @nullify_location: (not nullable): the memory address of the pointer. * * Set the pointer at the specified location to %NULL. **/ diff --git a/glib/gvariant-core.c b/glib/gvariant-core.c index a9f5d9423..8301250dd 100644 --- a/glib/gvariant-core.c +++ b/glib/gvariant-core.c @@ -1023,7 +1023,7 @@ g_variant_get_child_value (GVariant *value, /** * g_variant_store: * @value: the #GVariant to store - * @data: the location to store the serialised data at + * @data: (not nullable): the location to store the serialised data at * * Stores the serialised form of @value at @data. @data should be * large enough. See g_variant_get_size(). diff --git a/gobject/gboxed.c b/gobject/gboxed.c index 54f658ed3..40723f53b 100644 --- a/gobject/gboxed.c +++ b/gobject/gboxed.c @@ -322,11 +322,12 @@ g_boxed_type_register_static (const gchar *name, /** * g_boxed_copy: * @boxed_type: The type of @src_boxed. - * @src_boxed: The boxed structure to be copied. + * @src_boxed: (not nullable): The boxed structure to be copied. * * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type. * - * Returns: (transfer full): The newly created copy of the boxed structure. + * Returns: (transfer full) (not nullable): The newly created copy of the boxed + * structure. */ gpointer g_boxed_copy (GType boxed_type, @@ -383,7 +384,7 @@ g_boxed_copy (GType boxed_type, /** * g_boxed_free: * @boxed_type: The type of @boxed. - * @boxed: The boxed structure to be freed. + * @boxed: (not nullable): The boxed structure to be freed. * * Free the boxed structure @boxed which is of type @boxed_type. */ diff --git a/gobject/gboxed.h b/gobject/gboxed.h index d398da572..d169d03c6 100644 --- a/gobject/gboxed.h +++ b/gobject/gboxed.h @@ -46,18 +46,18 @@ G_BEGIN_DECLS /* --- typedefs --- */ /** * GBoxedCopyFunc: - * @boxed: The boxed structure to be copied. + * @boxed: (not nullable): The boxed structure to be copied. * * This function is provided by the user and should produce a copy * of the passed in boxed structure. * - * Returns: The newly created copy of the boxed structure. + * Returns: (not nullable): The newly created copy of the boxed structure. */ typedef gpointer (*GBoxedCopyFunc) (gpointer boxed); /** * GBoxedFreeFunc: - * @boxed: The boxed structure to be freed. + * @boxed: (not nullable): The boxed structure to be freed. * * This function is provided by the user and should free the boxed * structure passed. diff --git a/gobject/gclosure.c b/gobject/gclosure.c index 3c6894a7c..8daf5f9b4 100644 --- a/gobject/gclosure.c +++ b/gobject/gclosure.c @@ -319,7 +319,8 @@ g_closure_set_meta_va_marshal (GClosure *closure, /** * g_closure_set_meta_marshal: (skip) * @closure: a #GClosure - * @marshal_data: context-dependent data to pass to @meta_marshal + * @marshal_data: (closure meta_marshal): context-dependent data to pass + * to @meta_marshal * @meta_marshal: a #GClosureMarshal function * * Sets the meta marshaller of @closure. A meta marshaller wraps @@ -360,9 +361,11 @@ g_closure_set_meta_marshal (GClosure *closure, /** * g_closure_add_marshal_guards: (skip) * @closure: a #GClosure - * @pre_marshal_data: data to pass to @pre_marshal_notify + * @pre_marshal_data: (closure pre_marshal_notify): data to pass + * to @pre_marshal_notify * @pre_marshal_notify: a function to call before the closure callback - * @post_marshal_data: data to pass to @post_marshal_notify + * @post_marshal_data: (closure post_marshal_notify): data to pass + * to @post_marshal_notify * @post_marshal_notify: a function to call after the closure callback * * Adds a pair of notifiers which get invoked before and after the @@ -417,7 +420,7 @@ g_closure_add_marshal_guards (GClosure *closure, /** * g_closure_add_finalize_notifier: (skip) * @closure: a #GClosure - * @notify_data: data to pass to @notify_func + * @notify_data: (closure notify_func): data to pass to @notify_func * @notify_func: the callback function to register * * Registers a finalization notifier which will be called when the @@ -453,7 +456,7 @@ g_closure_add_finalize_notifier (GClosure *closure, /** * g_closure_add_invalidate_notifier: (skip) * @closure: a #GClosure - * @notify_data: data to pass to @notify_func + * @notify_data: (closure notify_func): data to pass to @notify_func * @notify_func: the callback function to register * * Registers an invalidation notifier which will be called when the @@ -921,7 +924,7 @@ _g_closure_set_va_marshal (GClosure *closure, /** * g_cclosure_new: (skip) * @callback_func: the function to invoke - * @user_data: user data to pass to @callback_func + * @user_data: (closure callback_func): user data to pass to @callback_func * @destroy_data: destroy notify to be called when @user_data is no longer used * * Creates a new closure which invokes @callback_func with @user_data as @@ -949,7 +952,7 @@ g_cclosure_new (GCallback callback_func, /** * g_cclosure_new_swap: (skip) * @callback_func: the function to invoke - * @user_data: user data to pass to @callback_func + * @user_data: (closure callback_func): user data to pass to @callback_func * @destroy_data: destroy notify to be called when @user_data is no longer used * * Creates a new closure which invokes @callback_func with @user_data as @@ -1496,7 +1499,8 @@ g_cclosure_marshal_generic (GClosure *closure, * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is + * invoked. * @args_list: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and diff --git a/gobject/gclosure.h b/gobject/gclosure.h index 41f0799c7..3195809c3 100644 --- a/gobject/gclosure.h +++ b/gobject/gclosure.h @@ -125,7 +125,8 @@ typedef void (*GClosureMarshal) (GClosure *closure, * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is + * invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and diff --git a/gobject/gmarshal.c b/gobject/gmarshal.c index 122f73f47..f270f2e66 100644 --- a/gobject/gmarshal.c +++ b/gobject/gmarshal.c @@ -426,7 +426,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -444,7 +444,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -461,7 +461,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -478,7 +478,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -495,7 +495,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -512,7 +512,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -529,7 +529,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -546,7 +546,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -563,7 +563,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -580,7 +580,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -597,7 +597,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -614,7 +614,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -631,7 +631,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -648,7 +648,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -665,7 +665,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -682,7 +682,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -699,7 +699,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -716,7 +716,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -733,7 +733,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -750,7 +750,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -767,7 +767,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and @@ -784,7 +784,7 @@ * @return_value: (allow-none): a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. - * @instance: the instance on which the closure is invoked. + * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked. * @args: va_list of arguments to be passed to the closure. * @marshal_data: (allow-none): additional data specified when * registering the marshaller, see g_closure_set_marshal() and diff --git a/gobject/gobject.c b/gobject/gobject.c index a3c0875e9..8163d3de6 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -702,7 +702,8 @@ g_object_class_install_properties (GObjectClass *oclass, /** * g_object_interface_install_property: - * @g_iface: any interface vtable for the interface, or the default + * @g_iface: (type GObject.TypeInterface): any interface vtable for the + * interface, or the default * vtable for the interface. * @pspec: the #GParamSpec for the new property * @@ -781,8 +782,8 @@ g_object_class_find_property (GObjectClass *class, /** * g_object_interface_find_property: - * @g_iface: any interface vtable for the interface, or the default - * vtable for the interface + * @g_iface: (type GObject.TypeInterface): any interface vtable for the + * interface, or the default vtable for the interface * @property_name: name of a property to lookup. * * Find the #GParamSpec with the given name for an @@ -919,8 +920,8 @@ g_object_class_list_properties (GObjectClass *class, /** * g_object_interface_list_properties: - * @g_iface: any interface vtable for the interface, or the default - * vtable for the interface + * @g_iface: (type GObject.TypeInterface): any interface vtable for the + * interface, or the default vtable for the interface * @n_properties_p: (out): location to store number of properties returned. * * Lists the properties of an interface.Generally, the interface @@ -1602,7 +1603,8 @@ g_object_get_type (void) * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) * which are not explicitly specified are set to their default values. * - * Returns: (transfer full): a new instance of @object_type + * Returns: (transfer full) (type GObject.Object) : a new instance of + * @object_type */ gpointer g_object_new (GType object_type, @@ -2248,7 +2250,7 @@ g_object_get_valist (GObject *object, /** * g_object_set: (skip) - * @object: a #GObject + * @object: (type GObject.Object): a #GObject * @first_property_name: name of the first property to set * @...: value for the first property, followed optionally by more * name/value pairs, followed by %NULL @@ -2276,7 +2278,7 @@ g_object_set (gpointer _object, /** * g_object_get: (skip) - * @object: a #GObject + * @object: (type GObject.Object): a #GObject * @first_property_name: name of the first property to get * @...: return location for the first property, followed optionally by more * name/return location pairs, followed by %NULL @@ -2452,7 +2454,7 @@ g_object_get_property (GObject *object, /** * g_object_connect: (skip) - * @object: a #GObject + * @object: (type GObject.Object): a #GObject * @signal_spec: the spec for the first signal * @...: #GCallback for the first signal, followed by data for the * first signal, followed optionally by more signal @@ -2482,7 +2484,7 @@ g_object_get_property (GObject *object, * NULL); * ]| * - * Returns: (transfer none): @object + * Returns: (transfer none) (type GObject.Object): @object */ gpointer g_object_connect (gpointer _object, @@ -2554,7 +2556,7 @@ g_object_connect (gpointer _object, /** * g_object_disconnect: (skip) - * @object: a #GObject + * @object: (type GObject.Object): a #GObject * @signal_spec: the spec for the first signal * @...: #GCallback for the first signal, followed by data for the first signal, * followed optionally by more signal spec/callback/data triples, @@ -2729,7 +2731,8 @@ g_object_weak_unref (GObject *object, /** * g_object_add_weak_pointer: (skip) * @object: The object that should be weak referenced. - * @weak_pointer_location: (inout): The memory address of a pointer. + * @weak_pointer_location: (inout) (not optional) (nullable): The memory address + * of a pointer. * * Adds a weak reference from weak_pointer to @object to indicate that * the pointer located at @weak_pointer_location is only valid during @@ -2756,7 +2759,8 @@ g_object_add_weak_pointer (GObject *object, /** * g_object_remove_weak_pointer: (skip) * @object: The object that is weak referenced. - * @weak_pointer_location: (inout): The memory address of a pointer. + * @weak_pointer_location: (inout) (not optional) (nullable): The memory address + * of a pointer. * * Removes a weak reference from @object that was previously added * using g_object_add_weak_pointer(). The @weak_pointer_location has @@ -3830,10 +3834,11 @@ g_value_dup_object (const GValue *value) /** * g_signal_connect_object: (skip) - * @instance: the instance to connect to. + * @instance: (type GObject.TypeInstance): the instance to connect to. * @detailed_signal: a string of the form "signal-name::detail". * @c_handler: the #GCallback to connect. - * @gobject: the object to pass as data to @c_handler. + * @gobject: (type GObject.Object) (nullable): the object to pass as data + * to @c_handler. * @connect_flags: a combination of #GConnectFlags. * * This is similar to g_signal_connect_data(), but uses a closure which @@ -4140,7 +4145,7 @@ g_initially_unowned_class_init (GInitiallyUnownedClass *klass) * g_weak_ref_init: (skip) * @weak_ref: (inout): uninitialized or empty location for a weak * reference - * @object: (allow-none): a #GObject or %NULL + * @object: (type GObject.Object) (nullable): a #GObject or %NULL * * Initialise a non-statically-allocated #GWeakRef. * @@ -4226,7 +4231,7 @@ g_weak_ref_get (GWeakRef *weak_ref) /** * g_weak_ref_set: (skip) * @weak_ref: location for a weak reference - * @object: (allow-none): a #GObject or %NULL + * @object: (type GObject.Object) (nullable): a #GObject or %NULL * * Change the object to which @weak_ref points, or set it to * %NULL. diff --git a/gobject/gparam.c b/gobject/gparam.c index e26482c3e..46c359ba2 100644 --- a/gobject/gparam.c +++ b/gobject/gparam.c @@ -417,7 +417,7 @@ is_canonical (const gchar *key) * @blurb, which should be a somewhat longer description, suitable for * e.g. a tooltip. The @nick and @blurb should ideally be localized. * - * Returns: a newly allocated #GParamSpec instance + * Returns: (type GObject.ParamSpec): a newly allocated #GParamSpec instance */ gpointer g_param_spec_internal (GType param_type, diff --git a/gobject/gsignal.c b/gobject/gsignal.c index 91d748ae0..9229f44a6 100644 --- a/gobject/gsignal.c +++ b/gobject/gsignal.c @@ -2112,7 +2112,8 @@ g_signal_chain_from_overridden (const GValue *instance_and_params, /** * g_signal_chain_from_overridden_handler: (skip) - * @instance: the instance the signal is being emitted on. + * @instance: (type GObject.TypeInstance): the instance the signal is being + * emitted on. * @...: parameters to be passed to the parent class closure, followed by a * location for the return value. If the return type of the signal * is #G_TYPE_NONE, the return value location can be omitted. @@ -3141,7 +3142,8 @@ accumulate (GSignalInvocationHint *ihint, /** * g_signal_emit_valist: (skip) - * @instance: the instance the signal is being emitted on. + * @instance: (type GObject.TypeInstance): the instance the signal is being + * emitted on. * @signal_id: the signal id * @detail: the detail * @var_args: a list of parameters to be passed to the signal, followed by a diff --git a/gobject/gtype.c b/gobject/gtype.c index 754507999..eb416aba9 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -4502,7 +4502,8 @@ gobject_init_ctor (void) /** * g_type_class_add_private: - * @g_class: class structure for an instantiatable type + * @g_class: (type GObject.TypeClass): class structure for an instantiatable + * type * @private_size: size of private structure * * Registers a private structure for an instantiatable type. @@ -4734,7 +4735,7 @@ g_type_instance_get_private (GTypeInstance *instance, /** * g_type_class_get_instance_private_offset: (skip) - * @g_class: a #GTypeClass + * @g_class: (type GObject.TypeClass): a #GTypeClass * * Gets the offset of the private data for instances of @g_class. * diff --git a/gobject/gtype.h b/gobject/gtype.h index f4cbf2f99..25f5bc12d 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -629,7 +629,7 @@ struct _GTypeQuery * This macro should only be used in type implementations. * * Since: 2.4 - * Returns: a pointer to the private data structure + * Returns: (not nullable): a pointer to the private data structure */ #define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type))) @@ -646,7 +646,7 @@ struct _GTypeQuery * This macro should only be used in type implementations. * * Since: 2.24 - * Returns: a pointer to the private data structure + * Returns: (not nullable): a pointer to the private data structure */ #define G_TYPE_CLASS_GET_PRIVATE(klass, g_type, c_type) ((c_type*) g_type_class_get_private ((GTypeClass*) (klass), (g_type))) @@ -746,7 +746,7 @@ int g_type_get_instance_count (GType type); /* --- type registration --- */ /** * GBaseInitFunc: - * @g_class: The #GTypeClass structure to initialize + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to initialize * * A callback function used by the type system to do base initialization * of the class structures of derived types. It is called as part of the @@ -755,23 +755,23 @@ int g_type_get_instance_count (GType type); * For example, class members (such as strings) that are not sufficiently * handled by a plain memory copy of the parent class into the derived class * have to be altered. See GClassInitFunc() for a discussion of the class - * intialization process. + * initialization process. */ typedef void (*GBaseInitFunc) (gpointer g_class); /** * GBaseFinalizeFunc: - * @g_class: The #GTypeClass structure to finalize + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to finalize * * A callback function used by the type system to finalize those portions * of a derived types class structure that were setup from the corresponding * GBaseInitFunc() function. Class finalization basically works the inverse - * way in which class intialization is performed. - * See GClassInitFunc() for a discussion of the class intialization process. + * way in which class initialization is performed. + * See GClassInitFunc() for a discussion of the class initialization process. */ typedef void (*GBaseFinalizeFunc) (gpointer g_class); /** * GClassInitFunc: - * @g_class: The #GTypeClass structure to initialize. + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to initialize. * @class_data: The @class_data member supplied via the #GTypeInfo structure. * * A callback function used by the type system to initialize the class @@ -874,7 +874,7 @@ typedef void (*GClassInitFunc) (gpointer g_class, gpointer class_data); /** * GClassFinalizeFunc: - * @g_class: The #GTypeClass structure to finalize + * @g_class: (type GObject.TypeClass): The #GTypeClass structure to finalize * @class_data: The @class_data member supplied via the #GTypeInfo structure * * A callback function used by the type system to finalize a class. @@ -890,7 +890,8 @@ typedef void (*GClassFinalizeFunc) (gpointer g_class, /** * GInstanceInitFunc: * @instance: The instance to initialize - * @g_class: The class of the type the instance is created for + * @g_class: (type GObject.TypeClass): The class of the type the instance is + * created for * * A callback function used by the type system to initialize a new * instance of a type. This function initializes all instance members and @@ -908,7 +909,7 @@ typedef void (*GInstanceInitFunc) (GTypeInstance *instance, gpointer g_class); /** * GInterfaceInitFunc: - * @g_iface: The interface structure to initialize + * @g_iface: (type GObject.TypeInterface): The interface structure to initialize * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure * * A callback function used by the type system to initialize a new @@ -922,7 +923,7 @@ typedef void (*GInterfaceInitFunc) (gpointer g_iface, gpointer iface_data); /** * GInterfaceFinalizeFunc: - * @g_iface: The interface structure to finalize + * @g_iface: (type GObject.TypeInterface): The interface structure to finalize * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure * * A callback function used by the type system to finalize an interface. @@ -934,7 +935,8 @@ typedef void (*GInterfaceFinalizeFunc) (gpointer g_iface, /** * GTypeClassCacheFunc: * @cache_data: data that was given to the g_type_add_class_cache_func() call - * @g_class: The #GTypeClass structure which is unreferenced + * @g_class: (type GObject.TypeClass): The #GTypeClass structure which is + * unreferenced * * A callback function which is called when the reference count of a class * drops to zero. It may use g_type_class_ref() to prevent the class from @@ -954,7 +956,8 @@ typedef gboolean (*GTypeClassCacheFunc) (gpointer cache_data, /** * GTypeInterfaceCheckFunc: * @check_data: data passed to g_type_add_interface_check() - * @g_iface: the interface that has been initialized + * @g_iface: (type GObject.TypeInterface): the interface that has been + * initialized * * A callback called after an interface vtable is initialized. * See g_type_add_interface_check(). diff --git a/gobject/gvalue.c b/gobject/gvalue.c index a3709b4ec..7276cc102 100644 --- a/gobject/gvalue.c +++ b/gobject/gvalue.c @@ -379,7 +379,7 @@ g_value_set_instance (GValue *value, /** * g_value_init_from_instance: * @value: An uninitialized #GValue structure. - * @instance: the instance + * @instance: (type GObject.TypeInstance): the instance * * Initializes and sets @value from an instantiatable type via the * value_table's collect_value() function.