diff options
author | Emmanuele Bassi <ebassi@gmail.com> | 2021-12-07 01:33:33 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2021-12-07 01:33:33 +0000 |
commit | 9d8eb95ee8baa0d9bef24858184164e558a5b7d6 (patch) | |
tree | e1cb2cd73016ae58bcb31d0a6a71f7ff7d6bb900 | |
parent | 28a4a7e5e065c411e892f899dd20bb0cdbf89b98 (diff) | |
download | gobject-introspection-9d8eb95ee8baa0d9bef24858184164e558a5b7d6.tar.gz |
Update giannotations.rst
Don't use a real function to describe optional/nullable differences, to avoid getting into
the weeds when it comes to edge cases.
Fixes: #211
-rw-r--r-- | docs/website/annotations/giannotations.rst | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/website/annotations/giannotations.rst b/docs/website/annotations/giannotations.rst index b37262fc..eaadf0ec 100644 --- a/docs/website/annotations/giannotations.rst +++ b/docs/website/annotations/giannotations.rst @@ -689,7 +689,7 @@ where the caller can pass NULL if they don’t want to receive the (out) value. g_file_get_contents ("/etc/motd", NULL, NULL, &error); // NOT VALID -g_hash_table_iter_next() demonstrates the difference between (nullable) and +mylib_hash_table_iter_next() demonstrates the difference between (nullable) and (optional) for (out) parameters. For an (out) parameter, (optional) indicates that NULL may be passed by the caller to indicate they don’t want to receive the (out) value. (nullable) indicates that NULL may be passed out by the @@ -698,25 +698,25 @@ callee as the returned value. :: /** - * g_hash_table_iter_next: - * @iter: an initialized #GHashTableIter + * mylib_hash_table_iter_next: + * @iter: an initialized #MylibHashTableIter * @key: (out) (optional): a location to store the key * @value: (out) (optional) (nullable): a location to store the value * * [...] * - * Returns: %FALSE if the end of the #GHashTable has been reached. + * Returns: %FALSE if the end of the #MylibHashTable has been reached. */ gboolean - g_hash_table_iter_next (GHashTableIter *iter, - gpointer *key, - gpointer *value); + mylib_hash_table_iter_next (MylibHashTableIter *iter, + gpointer *key, + gpointer *value); /* this is valid because value and key have (optional) */ - g_hash_table_iter_next (iter, NULL, NULL); + mylib_hash_table_iter_next (iter, NULL, NULL); gpointer key, value; - g_hash_table_iter_next (iter, &key, &value); + mylib_hash_table_iter_next (iter, &key, &value); if (value == NULL) /* this is valid because value has (nullable) */ |