Merge branch 'mcatanzaro/closure-audit' into 'main'

Audit and fix incorrect use of (closure) in glib

See merge request GNOME/glib!3287
This commit is contained in:
Philip Withnall 2023-07-21 19:20:07 +00:00
commit b4a6343a5c
25 changed files with 198 additions and 175 deletions

View File

@ -458,8 +458,8 @@ async_fill_callback_wrapper (GObject *source_object,
* @count: the number of bytes that will be read from the stream
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): a #gpointer
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* @user_data: a #gpointer
*
* Reads data into @stream's buffer asynchronously, up to @count size.
* @io_priority can be used to prioritize reads. For the synchronous

View File

@ -1127,8 +1127,8 @@ g_data_input_stream_read_finish (GDataInputStream *stream,
* @stream: a given #GDataInputStream.
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied.
* @user_data: (closure): the data to pass to callback function.
* @callback: (scope async) (closure user_data): callback to call when the request is satisfied.
* @user_data: the data to pass to callback function.
*
* The asynchronous version of g_data_input_stream_read_line(). It is
* an error to have two outstanding calls to this function.

View File

@ -1115,9 +1115,9 @@ g_file_enumerate_children (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call when the
* request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously gets the requested information about the files
* in a directory. The result is a #GFileEnumerator object that will
@ -1352,9 +1352,9 @@ g_file_query_info (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call when the
* request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously gets the requested information about specified @file.
* The result is a #GFileInfo object that contains key-value attributes
@ -1489,9 +1489,9 @@ g_file_query_filesystem_info (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously gets the requested information about the filesystem
* that the specified @file is on. The result is a #GFileInfo object
@ -1611,9 +1611,9 @@ g_file_find_enclosing_mount (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously gets the mount for the file.
*
@ -2099,9 +2099,9 @@ g_file_replace_readwrite (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously opens @file for reading.
*
@ -2167,9 +2167,9 @@ g_file_read_finish (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously opens @file for appending.
*
@ -2238,9 +2238,9 @@ g_file_append_to_finish (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously creates a new file and returns an output stream
* for writing to it. The file must not already exist.
@ -2312,9 +2312,9 @@ g_file_create_finish (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously overwrites the file, replacing the contents,
* possibly creating a backup copy of the file first.
@ -2386,9 +2386,9 @@ g_file_replace_finish (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously opens @file for reading and writing.
*
@ -2458,9 +2458,9 @@ g_file_open_readwrite_finish (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously creates a new file and returns a stream
* for reading and writing to it. The file must not already exist.
@ -2536,9 +2536,9 @@ g_file_create_readwrite_finish (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously overwrites the file in read-write mode,
* replacing the contents, possibly creating a backup copy
@ -3751,11 +3751,13 @@ g_file_copy (GFile *source,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @progress_callback: (nullable) (scope notified): function to callback with progress
* information, or %NULL if progress information is not needed
* @progress_callback_data: (closure progress_callback) (nullable): user data to pass to @progress_callback
* @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: (closure callback): the data to pass to callback function
* @progress_callback: (nullable) (scope notified) (closure progress_callback_data):
* function to callback with progress information, or %NULL if
* progress information is not needed
* @progress_callback_data: user data to pass to @progress_callback
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback
*
* Copies the file @source to the location specified by @destination
* asynchronously. For details of the behaviour, see g_file_copy().
@ -3965,12 +3967,11 @@ g_file_move (GFile *source,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @progress_callback: (nullable) (scope call): #GFileProgressCallback
* function for updates
* @progress_callback_data: (closure): gpointer to user data for
* the callback function
* @callback: a #GAsyncReadyCallback to call
* when the request is satisfied
* @progress_callback: (nullable) (scope call) (closure progress_callback_data):
* #GFileProgressCallback function for updates
* @progress_callback_data: gpointer to user data for the callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously moves a file @source to the location of @destination. For details of the behaviour, see g_file_move().
@ -4738,9 +4739,9 @@ g_file_set_display_name (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously sets the display name for a given #GFile.
*
@ -5072,8 +5073,9 @@ g_file_real_set_attributes_from_info (GFile *file,
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): a #gpointer
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously sets the attributes of @file with @info.
*
@ -5342,9 +5344,9 @@ g_file_set_attribute_int64 (GFile *file,
* or %NULL to avoid user interaction
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async) (nullable): a #GAsyncReadyCallback to call
* when the request is satisfied, or %NULL
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Mounts a file of type G_FILE_TYPE_MOUNTABLE.
* Using @mount_operation, you can request callbacks when, for instance,
@ -5428,9 +5430,9 @@ g_file_mount_mountable_finish (GFile *file,
* @flags: flags affecting the operation
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async) (nullable): a #GAsyncReadyCallback to call
* when the request is satisfied, or %NULL
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (nullable) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
*
@ -5517,9 +5519,9 @@ g_file_unmount_mountable_finish (GFile *file,
* or %NULL to avoid user interaction
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async) (nullable): a #GAsyncReadyCallback to call
* when the request is satisfied, or %NULL
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (nullable) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Unmounts a file of type %G_FILE_TYPE_MOUNTABLE.
*
@ -5616,9 +5618,9 @@ g_file_unmount_mountable_with_operation_finish (GFile *file,
* @flags: flags affecting the operation
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async) (nullable): a #GAsyncReadyCallback to call
* when the request is satisfied, or %NULL
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (nullable) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Starts an asynchronous eject on a mountable.
* When this operation has completed, @callback will be called with
@ -5702,9 +5704,9 @@ g_file_eject_mountable_finish (GFile *file,
* or %NULL to avoid user interaction
* @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore
* @callback: (scope async) (nullable): a #GAsyncReadyCallback to call
* when the request is satisfied, or %NULL
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (nullable) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Starts an asynchronous eject on a mountable.
* When this operation has completed, @callback will be called with
@ -9329,9 +9331,9 @@ g_file_load_bytes_cb (GObject *object,
* g_file_load_bytes_async:
* @file: a #GFile
* @cancellable: (nullable): 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
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously loads the contents of @file as #GBytes.
*

View File

@ -314,8 +314,9 @@ next_async_callback_wrapper (GObject *source_object,
* @num_files: the number of file info objects to request
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request information for a number of files from the enumerator asynchronously.
* When all I/O for the operation is finished the @callback will be called with
@ -485,8 +486,9 @@ close_async_callback_wrapper (GObject *source_object,
* @enumerator: a #GFileEnumerator.
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously closes the file enumerator.
*

View File

@ -177,8 +177,9 @@ async_ready_callback_wrapper (GObject *source_object,
* @attributes: a file attribute query string.
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Queries the stream information asynchronously.
* When the operation is finished @callback will be called.

View File

@ -195,8 +195,9 @@ async_ready_callback_wrapper (GObject *source_object,
* @attributes: a file attribute query string.
* @io_priority: the [I/O priority][gio-GIOScheduler] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously queries the @stream for a #GFileInfo. When completed,
* @callback will be called with a #GAsyncResult which can be used to

View File

@ -589,8 +589,9 @@ async_ready_close_callback_wrapper (GObject *source_object,
* @io_priority: the [I/O priority][io-priority]
* of the request.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request an asynchronous read of @count bytes from the stream into the buffer
* starting at @buffer. When the operation is finished @callback will be called.
@ -780,8 +781,9 @@ read_all_async_thread (GTask *task,
* @count: (in): the number of bytes that will be read from the stream
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request an asynchronous read of @count bytes from the stream into the
* buffer starting at @buffer.
@ -915,8 +917,9 @@ read_bytes_callback (GObject *stream,
* @count: the number of bytes that will be read from the stream
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request an asynchronous read of @count bytes from the stream into a
* new #GBytes. When the operation is finished @callback will be
@ -993,8 +996,9 @@ g_input_stream_read_bytes_finish (GInputStream *stream,
* @count: the number of bytes that will be skipped from the stream
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request an asynchronous skip of @count bytes from the stream.
* When the operation is finished @callback will be called.
@ -1104,8 +1108,9 @@ g_input_stream_skip_finish (GInputStream *stream,
* @stream: A #GInputStream.
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional cancellable object
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Requests an asynchronous closes of the stream, releasing resources related to it.
* When the operation is finished @callback will be called.

View File

@ -464,8 +464,9 @@ async_ready_close_callback_wrapper (GObject *source_object,
* @stream: a #GIOStream
* @io_priority: the io priority of the request
* @cancellable: (nullable): optional cancellable object
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Requests an asynchronous close of the stream, releasing resources
* related to it. When the operation is finished @callback will be
@ -829,8 +830,9 @@ splice_cancelled_cb (GCancellable *cancellable,
* @flags: a set of #GIOStreamSpliceFlags.
* @io_priority: the io priority of the request.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback.
* @user_data: (closure): user data passed to @callback.
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously splice the output stream of @stream1 to the input stream of
* @stream2, and splice the output stream of @stream2 to the input stream of

View File

@ -305,8 +305,8 @@ g_list_store_insert (GListStore *store,
* g_list_store_insert_sorted:
* @store: a #GListStore
* @item: (type GObject): the new item
* @compare_func: (scope call): pairwise comparison function for sorting
* @user_data: (closure): user data for @compare_func
* @compare_func: (scope call) (closure user_data): pairwise comparison function for sorting
* @user_data: user data for @compare_func
*
* Inserts @item into @store at a position to be determined by the
* @compare_func.
@ -345,8 +345,8 @@ g_list_store_insert_sorted (GListStore *store,
/**
* g_list_store_sort:
* @store: a #GListStore
* @compare_func: (scope call): pairwise comparison function for sorting
* @user_data: (closure): user data for @compare_func
* @compare_func: (scope call) (closure user_data): pairwise comparison function for sorting
* @user_data: user data for @compare_func
*
* Sort the items in @store according to @compare_func.
*
@ -564,8 +564,8 @@ g_list_store_find_with_equal_func (GListStore *store,
* g_list_store_find_with_equal_func_full:
* @store: a #GListStore
* @item: (type GObject) (nullable): an item
* @equal_func: (scope call): A custom equality check function
* @user_data: (closure): user data for @equal_func
* @equal_func: (scope call) (closure user_data): A custom equality check function
* @user_data: user data for @equal_func
* @position: (out) (optional): the first position of @item, if it was found.
*
* Like g_list_store_find_with_equal_func() but with an additional @user_data

View File

@ -95,9 +95,9 @@ g_loadable_icon_load (GLoadableIcon *icon,
* @icon: a #GLoadableIcon.
* @size: an integer.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the
* request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Loads an icon asynchronously. To finish this function, see
* g_loadable_icon_load_finish(). For the synchronous, blocking

View File

@ -254,9 +254,9 @@ g_network_monitor_real_can_reach_async (GNetworkMonitor *monitor,
* @monitor: a #GNetworkMonitor
* @connectable: a #GSocketConnectable
* @cancellable: (nullable): 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
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: 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

View File

@ -979,8 +979,9 @@ async_ready_write_callback_wrapper (GObject *source_object,
* @count: the number of bytes to write
* @io_priority: the io priority of the request.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request an asynchronous write of @count bytes from @buffer into
* the stream. When the operation is finished @callback will be called.
@ -1173,8 +1174,9 @@ write_all_async_thread (GTask *task,
* @count: the number of bytes to write
* @io_priority: the io priority of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request an asynchronous write of @count bytes from @buffer into
* the stream. When the operation is finished @callback will be called.
@ -1283,8 +1285,9 @@ g_output_stream_write_all_finish (GOutputStream *stream,
* @n_vectors: the number of vectors to write
* @io_priority: the I/O priority of the request.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request an asynchronous write of the bytes contained in @n_vectors @vectors into
* the stream. When the operation is finished @callback will be called.
@ -1477,8 +1480,9 @@ writev_all_async_thread (GTask *task,
* @n_vectors: the number of vectors to write
* @io_priority: the I/O priority of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Request an asynchronous write of the bytes contained in the @n_vectors @vectors into
* the stream. When the operation is finished @callback will be called.
@ -1623,8 +1627,9 @@ write_bytes_callback (GObject *stream,
* @bytes: The bytes to write
* @io_priority: the io priority of the request.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* This function is similar to g_output_stream_write_async(), but
* takes a #GBytes as input. Due to the refcounted nature of #GBytes,
@ -1724,8 +1729,9 @@ async_ready_splice_callback_wrapper (GObject *source_object,
* @flags: a set of #GOutputStreamSpliceFlags.
* @io_priority: the io priority of the request.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback.
* @user_data: (closure): user data passed to @callback.
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Splices a stream asynchronously.
* When the operation is finished @callback will be called.
@ -1840,8 +1846,9 @@ async_ready_flush_callback_wrapper (GObject *source_object,
* @stream: a #GOutputStream.
* @io_priority: the io priority of the request.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Forces an asynchronous write of all user-space buffered data for
* the given @stream.
@ -1999,8 +2006,9 @@ real_close_async_cb (GObject *source_object,
* @stream: A #GOutputStream.
* @io_priority: the io priority of the request.
* @cancellable: (nullable): optional cancellable object
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Requests an asynchronous close of the stream, releasing resources
* related to it. When the operation is finished @callback will be

View File

@ -127,7 +127,7 @@ g_proxy_connect (GProxy *proxy,
* @proxy_address: a #GProxyAddress
* @cancellable: (nullable): a #GCancellable
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): callback data
* @user_data: callback data
*
* Asynchronous version of g_proxy_connect().
*

View File

@ -184,7 +184,7 @@ g_proxy_resolver_lookup (GProxyResolver *resolver,
* @uri: a URI representing the destination to connect to
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): callback to call after resolution completes
* @user_data: (closure): data for @callback
* @user_data: data for @callback
*
* Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
* details.

View File

@ -763,8 +763,8 @@ lookup_by_name_finish_real (GResolver *resolver,
* @hostname: the hostname to look up the address of
* @flags: extra #GResolverNameLookupFlags for the lookup
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): callback to call after resolution completes
* @user_data: (closure): data for @callback
* @callback: (scope async) (closure user_data): callback to call after resolution completes
* @user_data: data for @callback
*
* Begins asynchronously resolving @hostname to determine its
* associated IP address(es), and eventually calls @callback, which
@ -794,8 +794,8 @@ g_resolver_lookup_by_name_with_flags_async (GResolver *resolver,
* @resolver: a #GResolver
* @hostname: the hostname to look up the address of
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): callback to call after resolution completes
* @user_data: (closure): data for @callback
* @callback: (scope async) (closure user_data): callback to call after resolution completes
* @user_data: data for @callback
*
* Begins asynchronously resolving @hostname to determine its
* associated IP address(es), and eventually calls @callback, which
@ -941,8 +941,8 @@ g_resolver_lookup_by_address (GResolver *resolver,
* @resolver: a #GResolver
* @address: the address to reverse-resolve
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): callback to call after resolution completes
* @user_data: (closure): data for @callback
* @callback: (scope async) (closure user_data): callback to call after resolution completes
* @user_data: data for @callback
*
* Begins asynchronously reverse-resolving @address to determine its
* associated hostname, and eventually calls @callback, which must
@ -1092,8 +1092,8 @@ g_resolver_lookup_service (GResolver *resolver,
* @protocol: the networking protocol to use for @service (eg, "tcp")
* @domain: the DNS domain to look up the service in
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): callback to call after resolution completes
* @user_data: (closure): data for @callback
* @callback: (scope async) (closure user_data): callback to call after resolution completes
* @user_data: data for @callback
*
* Begins asynchronously performing a DNS SRV lookup for the given
* @service and @protocol in the given @domain, and eventually calls
@ -1241,8 +1241,8 @@ g_resolver_lookup_records (GResolver *resolver,
* @rrname: the DNS name to look up the record for
* @record_type: the type of DNS record to look up
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): callback to call after resolution completes
* @user_data: (closure): data for @callback
* @callback: (scope async) (closure user_data): callback to call after resolution completes
* @user_data: data for @callback
*
* Begins asynchronously performing a DNS lookup for the given
* @rrname, and eventually calls @callback, which must call

View File

@ -131,7 +131,7 @@ struct _GResolverClass {
* @flags: extra #GResolverNameLookupFlags to modify the lookup
* @cancellable: (nullable): a #GCancellable
* @callback: (scope async): a #GAsyncReadyCallback to call when completed
* @user_data: (closure): data to pass to @callback
* @user_data: data to pass to @callback
*
* Asynchronous version of GResolverClass::lookup_by_name_with_flags
*

View File

@ -295,7 +295,7 @@ g_simple_async_result_init (GSimpleAsyncResult *simple)
* g_simple_async_result_new:
* @source_object: (nullable): a #GObject, or %NULL.
* @callback: (scope async): a #GAsyncReadyCallback.
* @user_data: (closure): user data passed to @callback.
* @user_data: user data passed to @callback.
* @source_tag: the asynchronous function.
*
* Creates a #GSimpleAsyncResult.
@ -339,7 +339,7 @@ g_simple_async_result_new (GObject *source_object,
* g_simple_async_result_new_from_error:
* @source_object: (nullable): a #GObject, or %NULL.
* @callback: (scope async): a #GAsyncReadyCallback.
* @user_data: (closure): user data passed to @callback.
* @user_data: user data passed to @callback.
* @error: a #GError
*
* Creates a #GSimpleAsyncResult from an error condition.
@ -369,8 +369,8 @@ g_simple_async_result_new_from_error (GObject *source_object,
/**
* g_simple_async_result_new_take_error: (skip)
* @source_object: (nullable): a #GObject, or %NULL
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): user data passed to @callback
* @callback: (scope async): a #GAsyncReadyCallback.
* @user_data: user data passed to @callback.
* @error: a #GError
*
* Creates a #GSimpleAsyncResult from an error condition, and takes over the
@ -404,7 +404,7 @@ g_simple_async_result_new_take_error (GObject *source_object,
* g_simple_async_result_new_error:
* @source_object: (nullable): a #GObject, or %NULL.
* @callback: (scope async): a #GAsyncReadyCallback.
* @user_data: (closure): user data passed to @callback.
* @user_data: user data passed to @callback.
* @domain: a #GQuark.
* @code: an error code.
* @format: a string with format characters.
@ -1051,7 +1051,7 @@ g_simple_async_report_error_in_idle (GObject *object,
* g_simple_async_report_gerror_in_idle:
* @object: (nullable): a #GObject, or %NULL
* @callback: (scope async): a #GAsyncReadyCallback.
* @user_data: (closure): user data passed to @callback.
* @user_data: user data passed to @callback.
* @error: the #GError to report
*
* Reports an error in an idle function. Similar to

View File

@ -135,9 +135,9 @@ g_socket_address_enumerator_real_next_async (GSocketAddressEnumerator *enumerato
* g_socket_address_enumerator_next_async:
* @enumerator: a #GSocketAddressEnumerator
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the request
* is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback to call
* when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously retrieves the next #GSocketAddress from @enumerator
* and then calls @callback, which must call

View File

@ -2057,7 +2057,7 @@ g_socket_client_enumerator_callback (GObject *object,
* @connectable: a #GSocketConnectable specifying the remote address.
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): user data for the callback
* @user_data: user data for the callback
*
* This is the asynchronous version of g_socket_client_connect().
*
@ -2162,7 +2162,7 @@ g_socket_client_connect_async (GSocketClient *client,
* @default_port: the default port to connect to
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): user data for the callback
* @user_data: user data for the callback
*
* This is the asynchronous version of g_socket_client_connect_to_host().
*
@ -2208,7 +2208,7 @@ g_socket_client_connect_to_host_async (GSocketClient *client,
* @service: the name of the service to connect to
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): user data for the callback
* @user_data: user data for the callback
*
* This is the asynchronous version of
* g_socket_client_connect_to_service().
@ -2239,7 +2239,7 @@ g_socket_client_connect_to_service_async (GSocketClient *client,
* @default_port: the default port to connect to
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): user data for the callback
* @user_data: user data for the callback
*
* This is the asynchronous version of g_socket_client_connect_to_uri().
*

View File

@ -173,7 +173,7 @@ static gboolean g_socket_connection_connect_callback (GSocket *socket,
* @address: a #GSocketAddress specifying the remote address.
* @cancellable: (nullable): a %GCancellable or %NULL
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): user data for the callback
* @user_data: user data for the callback
*
* Asynchronously connect @connection to the specified remote address.
*

View File

@ -835,7 +835,7 @@ accept_ready (GSocket *accept_socket,
* @listener: a #GSocketListener
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): user data for the callback
* @user_data: user data for the callback
*
* This is the asynchronous version of g_socket_listener_accept_socket().
*
@ -910,7 +910,7 @@ g_socket_listener_accept_socket_finish (GSocketListener *listener,
* @listener: a #GSocketListener
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: (scope async): a #GAsyncReadyCallback
* @user_data: (closure): user data for the callback
* @user_data: user data for the callback
*
* This is the asynchronous version of g_socket_listener_accept().
*

View File

@ -803,7 +803,7 @@ g_task_finalize (GObject *object)
* this task, or %NULL.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback.
* @callback_data: (closure): user data passed to @callback.
* @callback_data: user data passed to @callback.
*
* Creates a #GTask acting on @source_object, which will eventually be
* used to invoke @callback in the current
@ -856,8 +856,8 @@ g_task_new (gpointer source_object,
* g_task_report_error:
* @source_object: (nullable) (type GObject): the #GObject that owns
* this task, or %NULL.
* @callback: (scope async): a #GAsyncReadyCallback.
* @callback_data: (closure): user data passed to @callback.
* @callback: (scope async) (closure callback_data): a #GAsyncReadyCallback.
* @callback_data: user data passed to @callback.
* @source_tag: an opaque pointer indicating the source of this task
* @error: (transfer full): error to report
*
@ -892,8 +892,8 @@ g_task_report_error (gpointer source_object,
* g_task_report_new_error:
* @source_object: (nullable) (type GObject): the #GObject that owns
* this task, or %NULL.
* @callback: (scope async): a #GAsyncReadyCallback.
* @callback_data: (closure): user data passed to @callback.
* @callback: (scope async) (closure callback_data): a #GAsyncReadyCallback.
* @callback_data: user data passed to @callback.
* @source_tag: an opaque pointer indicating the source of this task
* @domain: a #GQuark.
* @code: an error code.

View File

@ -416,8 +416,9 @@ send_credentials_async_thread (GTask *task,
* g_unix_connection_send_credentials_async:
* @connection: A #GUnixConnection.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously send credentials.
*
@ -689,8 +690,9 @@ receive_credentials_async_thread (GTask *task,
* g_unix_connection_receive_credentials_async:
* @connection: A #GUnixConnection.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @callback: (scope async): a #GAsyncReadyCallback
* to call when the request is satisfied
* @user_data: the data to pass to callback function
*
* Asynchronously receive credentials.
*

View File

@ -935,8 +935,8 @@ g_datalist_id_get_data (GData **datalist,
* g_datalist_id_dup_data: (skip)
* @datalist: location of a datalist
* @key_id: the #GQuark identifying a data element
* @dup_func: (nullable) (scope call): function to duplicate the old value
* @user_data: (closure): passed as user_data to @dup_func
* @dup_func: (scope call) (closure user_data): function to duplicate the old value
* @user_data: passed as user_data to @dup_func
*
* This is a variant of g_datalist_id_get_data() which
* returns a 'duplicate' of the value. @dup_func defines the
@ -1176,8 +1176,8 @@ g_datalist_get_data (GData **datalist,
/**
* g_dataset_foreach:
* @dataset_location: (not nullable): the location identifying the dataset.
* @func: (scope call): the function to call for each data element.
* @user_data: (closure): user data to pass to the function.
* @func: (scope call) (closure user_data): the function to call for each data element.
* @user_data: user data to pass to the function.
*
* Calls the given function for each data element which is associated
* with the given location. Note that this function is NOT thread-safe.
@ -1215,8 +1215,8 @@ g_dataset_foreach (gconstpointer dataset_location,
/**
* g_datalist_foreach:
* @datalist: a datalist.
* @func: (scope call): the function to call for each data element.
* @user_data: (closure): user data to pass to the function.
* @func: (scope call) (closure user_data): the function to call for each data element.
* @user_data: user data to pass to the function.
*
* Calls the given function for each data element of the datalist. The
* function is called with each data element's #GQuark id and data,

View File

@ -218,8 +218,8 @@ G_DEFINE_QUARK (g-spawn-exit-error-quark, g_spawn_exit_error)
* @envp: (array zero-terminated=1) (element-type filename) (nullable):
* child's environment, or %NULL to inherit parent's
* @flags: flags from #GSpawnFlags
* @child_setup: (scope async) (nullable): function to run in the child just before exec()
* @user_data: (closure): user data for @child_setup
* @child_setup: (scope async): function to run in the child just before exec()
* @user_data: user data for @child_setup
* @child_pid: (out) (optional): return location for child process reference, or %NULL
* @error: return location for error
*
@ -332,8 +332,8 @@ read_data (GString *str,
* @envp: (array zero-terminated=1) (element-type filename) (nullable):
* child's environment, or %NULL to inherit parent's
* @flags: flags from #GSpawnFlags
* @child_setup: (scope async) (nullable): function to run in the child just before exec()
* @user_data: (closure): user data for @child_setup
* @child_setup: (scope async): function to run in the child just before exec()
* @user_data: user data for @child_setup
* @standard_output: (out) (array zero-terminated=1) (element-type guint8) (optional): return location for child output, or %NULL
* @standard_error: (out) (array zero-terminated=1) (element-type guint8) (optional): return location for child error messages, or %NULL
* @wait_status: (out) (optional): return location for child wait status, as returned by waitpid(), or %NULL
@ -593,8 +593,8 @@ g_spawn_sync (const gchar *working_directory,
* child's environment, or %NULL to inherit parent's, in the GLib file
* name encoding
* @flags: flags from #GSpawnFlags
* @child_setup: (scope async) (nullable): function to run in the child just before exec()
* @user_data: (closure): user data for @child_setup
* @child_setup: (scope async): function to run in the child just before exec()
* @user_data: user data for @child_setup
* @child_pid: (out) (optional): return location for child process ID, or %NULL
* @standard_input: (out) (optional): return location for file descriptor to write to child's stdin, or %NULL
* @standard_output: (out) (optional): return location for file descriptor to read child's stdout, or %NULL
@ -643,8 +643,8 @@ g_spawn_async_with_pipes (const gchar *working_directory,
* child's environment, or %NULL to inherit parent's, in the GLib file
* name encoding
* @flags: flags from #GSpawnFlags
* @child_setup: (scope async) (nullable): function to run in the child just before `exec()`
* @user_data: (closure): user data for @child_setup
* @child_setup: (scope async) (closure user_data): function to run in the child just before `exec()`
* @user_data: user data for @child_setup
* @stdin_fd: file descriptor to use for child's stdin, or `-1`
* @stdout_fd: file descriptor to use for child's stdout, or `-1`
* @stderr_fd: file descriptor to use for child's stderr, or `-1`
@ -929,8 +929,8 @@ g_spawn_async_with_pipes_and_fds (const gchar *working_directory,
* it must be non-empty and %NULL-terminated
* @envp: (array zero-terminated=1) (nullable): child's environment, or %NULL to inherit parent's, in the GLib file name encoding
* @flags: flags from #GSpawnFlags
* @child_setup: (scope async) (nullable): function to run in the child just before exec()
* @user_data: (closure): user data for @child_setup
* @child_setup: (scope async) (closure user_data): function to run in the child just before exec()
* @user_data: user data for @child_setup
* @child_pid: (out) (optional): return location for child process ID, or %NULL
* @stdin_fd: file descriptor to use for child's stdin, or `-1`
* @stdout_fd: file descriptor to use for child's stdout, or `-1`