[gobject-introspection] Update giannotations.rst
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Update giannotations.rst
- Date: Tue, 7 Dec 2021 01:33:33 +0000 (UTC)
commit 9d8eb95ee8baa0d9bef24858184164e558a5b7d6
Author: Emmanuele Bassi <ebassi gmail com>
Date: Tue Dec 7 01:33:33 2021 +0000
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
docs/website/annotations/giannotations.rst | 18 +++++++++---------
1 file 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) */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]