diff options
author | Philip Withnall <withnall@endlessm.com> | 2017-04-28 12:29:44 +0100 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2017-04-28 12:32:12 +0100 |
commit | b63469d7261a3d98207647a7f05167f21f22dbc1 (patch) | |
tree | f7cd21979f7fa80a6737dd22e884bee3c25cb154 /glib | |
parent | 88ad0dab214799f17f0ddc463d10f44c00587dbf (diff) | |
download | glib-b63469d7261a3d98207647a7f05167f21f22dbc1.tar.gz |
docs: Fix (nullable) (optional) annotations
There are a few places where commit 18a33f72 replaced valid (nullable)
(optional) annotations with just (optional). That has a different
meaning.
(nullable) (optional) can only be applied to gpointer* parameters, and
means that both the gpointer* and returned gpointer can be NULL. i.e.
The caller can pass in NULL to ignore the return value; and the returned
value can be NULL.
(optional) can be applied to anything* parameters, and means that the
anything* can be NULL. i.e. The caller can pass in NULL to ignore the
return value. The return value cannot be NULL.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'glib')
-rw-r--r-- | glib/gconvert.c | 2 | ||||
-rw-r--r-- | glib/gerror.c | 2 | ||||
-rw-r--r-- | glib/ghash.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/glib/gconvert.c b/glib/gconvert.c index 0d8f47d13..6e5a7cf9d 100644 --- a/glib/gconvert.c +++ b/glib/gconvert.c @@ -1477,7 +1477,7 @@ hostname_validate (const char *hostname) /** * g_filename_from_uri: * @uri: a uri describing a filename (escaped, encoded in ASCII). - * @hostname: (out) (optional): Location to store hostname for the URI. + * @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/gerror.c b/glib/gerror.c index 625e67b02..380382b33 100644 --- a/glib/gerror.c +++ b/glib/gerror.c @@ -694,7 +694,7 @@ g_error_add_prefix (gchar **string, /** * g_prefix_error: - * @err: (inout) (optional): a return location for a #GError + * @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 25b8c568d..9afa121d9 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -770,7 +770,7 @@ g_hash_table_iter_init (GHashTableIter *iter, * g_hash_table_iter_next: * @iter: an initialized #GHashTableIter * @key: (out) (optional): a location to store the key - * @value: (out) (optional): a location to store the value + * @value: (out) (optional) (nullable): 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, @@ -1158,7 +1158,7 @@ g_hash_table_lookup (GHashTable *hash_table, * @hash_table: a #GHashTable * @lookup_key: the key to look up * @orig_key: (out) (optional): return location for the original key - * @value: (out) (optional): return location for the value associated + * @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 |