mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +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:
@@ -498,7 +498,7 @@ static const gchar *replace_data =
|
||||
" * @file: input #GFile.\n"
|
||||
" * @contents: string of contents to replace the file with.\n"
|
||||
" * @length: the length of @contents in bytes.\n"
|
||||
" * @etag: (allow-none): a new <link linkend=\"gfile-etag\">entity tag</link> for the @file, or %NULL\n"
|
||||
" * @etag: (nullable): a new <link linkend=\"gfile-etag\">entity tag</link> for the @file, or %NULL\n"
|
||||
" * @make_backup: %TRUE if a backup should be created.\n"
|
||||
" * @flags: a set of #GFileCreateFlags.\n"
|
||||
" * @cancellable: optional #GCancellable object, %NULL to ignore.\n"
|
||||
|
@@ -36,8 +36,8 @@
|
||||
|
||||
/**
|
||||
* test_pipe:
|
||||
* @is: (out) (allow-none): used to return a #GInputStream
|
||||
* @os: (out) (allow-none): used to return a #GOutputStream
|
||||
* @is: (out) (optional): used to return a #GInputStream
|
||||
* @os: (out) (optional): used to return a #GOutputStream
|
||||
* @error: used to raise an error
|
||||
*
|
||||
* Return a "pipe to self" connecting @is to @os. This can be used
|
||||
@@ -82,8 +82,8 @@ test_pipe (GInputStream **is,
|
||||
|
||||
/**
|
||||
* test_bidi_pipe:
|
||||
* @left: (out) (allow-none): used to return one #GIOStream
|
||||
* @right: (out) (allow-none): used to return the other #GIOStream
|
||||
* @left: (out) (optional): used to return one #GIOStream
|
||||
* @right: (out) (optional): used to return the other #GIOStream
|
||||
* @error: used to raise an error
|
||||
*
|
||||
* Return two #GIOStream<!---->s connected to each other with pipes.
|
||||
|
Reference in New Issue
Block a user