[gobject-introspection] Update glib annotations



commit f2fa1ae4f17abe7ebbd752b2bf3124375a2d9f82
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue Jan 8 16:15:52 2019 +0100

    Update glib annotations

 gir/glib-2.0.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c
index aa46726e..89857cc6 100644
--- a/gir/glib-2.0.c
+++ b/gir/glib-2.0.c
@@ -2740,11 +2740,16 @@
  * G_ALIGNOF:
  * @a: a type-name
  *
- * Return the minimum alignment required by the platform ABI for values of the given
+ * Return the minimal alignment required by the platform ABI for values of the given
  * type. The address of a variable or struct member of the given type must always be
  * a multiple of this alignment. For example, most platforms require int variables
  * to be aligned at a 4-byte boundary, so `G_ALIGNOF (int)` is 4 on most platforms.
  *
+ * Note this is not necessarily the same as the value returned by GCC’s
+ * `__alignof__` operator, which returns the preferred alignment for a type.
+ * The preferred alignment may be a stricter alignment than the minimal
+ * alignment.
+ *
  * Since: 2.60
  */
 
@@ -24068,7 +24073,7 @@
 /**
  * g_option_context_parse_strv:
  * @context: a #GOptionContext
- * @arguments: (inout) (array null-terminated=1): a pointer to the
+ * @arguments: (inout) (array zero-terminated=1): a pointer to the
  *    command line arguments (which must be in UTF-8 on Windows)
  * @error: a return location for errors
  *
@@ -39373,6 +39378,15 @@
  * A standard boolean type.
  * Variables of this type should only contain the value
  * %TRUE or %FALSE.
+ *
+ * Never directly compare the contents of a #gboolean variable with the values
+ * %TRUE or %FALSE. Use `if (condition)` to check a #gboolean is "true", instead
+ * of `if (condition == TRUE)`. Likewise use `if (!condition)` to check a
+ * #gboolean is "false".
+ *
+ * There is no validation when assigning to a #gboolean variable and so it could
+ * contain any value represented by a #gint. This is why the use of `if
+ * (condition)` is recommended. All non-zero values in C evaluate to "true".
  */
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]