mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
introspection: use (nullable) or (optional) instead of (allow-none)
If we have an input parameter (or return value) we need to use (nullable). However, if it is an (inout) or (out) parameter, (optional) is sufficient. It looks like (nullable) could be used for everything according to the Annotation documentation, but (optional) is more specific.
This commit is contained in:
@@ -130,7 +130,7 @@ g_input_stream_init (GInputStream *stream)
|
||||
* @buffer: (array length=count) (element-type guint8): a buffer to
|
||||
* read data into (which should be at least count bytes long).
|
||||
* @count: the number of bytes that will be read from the stream
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
*
|
||||
* Tries to read @count bytes from the stream into the buffer starting at
|
||||
@@ -212,7 +212,7 @@ g_input_stream_read (GInputStream *stream,
|
||||
* read data into (which should be at least count bytes long).
|
||||
* @count: the number of bytes that will be read from the stream
|
||||
* @bytes_read: (out): location to store the number of bytes that was read from the stream
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
*
|
||||
* Tries to read @count bytes from the stream into the buffer starting at
|
||||
@@ -279,7 +279,7 @@ g_input_stream_read_all (GInputStream *stream,
|
||||
* @stream: a #GInputStream.
|
||||
* @count: maximum number of bytes that will be read from the stream. Common
|
||||
* values include 4096 and 8192.
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
*
|
||||
* Like g_input_stream_read(), this tries to read @count bytes from
|
||||
@@ -339,7 +339,7 @@ g_input_stream_read_bytes (GInputStream *stream,
|
||||
* g_input_stream_skip:
|
||||
* @stream: a #GInputStream.
|
||||
* @count: the number of bytes that will be skipped from the stream
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
*
|
||||
* Tries to skip @count bytes from the stream. Will block during the operation.
|
||||
@@ -455,7 +455,7 @@ g_input_stream_real_skip (GInputStream *stream,
|
||||
/**
|
||||
* g_input_stream_close:
|
||||
* @stream: A #GInputStream.
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
*
|
||||
* Closes the stream, releasing resources related to it.
|
||||
@@ -555,7 +555,7 @@ async_ready_close_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: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @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
|
||||
*
|
||||
@@ -746,7 +746,7 @@ read_all_async_thread (GTask *task,
|
||||
* read data into (which should be at least count bytes long)
|
||||
* @count: the number of bytes that will be read from the stream
|
||||
* @io_priority: the [I/O priority][io-priority] of the request
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
|
||||
* @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
|
||||
*
|
||||
@@ -881,7 +881,7 @@ read_bytes_callback (GObject *stream,
|
||||
* @stream: A #GInputStream.
|
||||
* @count: the number of bytes that will be read from the stream
|
||||
* @io_priority: the [I/O priority][io-priority] of the request
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @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
|
||||
*
|
||||
@@ -959,7 +959,7 @@ g_input_stream_read_bytes_finish (GInputStream *stream,
|
||||
* @stream: A #GInputStream.
|
||||
* @count: the number of bytes that will be skipped from the stream
|
||||
* @io_priority: the [I/O priority][io-priority] of the request
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @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
|
||||
*
|
||||
@@ -1070,7 +1070,7 @@ g_input_stream_skip_finish (GInputStream *stream,
|
||||
* g_input_stream_close_async:
|
||||
* @stream: A #GInputStream.
|
||||
* @io_priority: the [I/O priority][io-priority] of the request
|
||||
* @cancellable: (allow-none): optional cancellable object
|
||||
* @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
|
||||
*
|
||||
|
Reference in New Issue
Block a user