summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-09-14 17:00:23 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2020-09-14 17:00:23 +0100
commit595cc929e69c1c3e44c0f59a04d9b3f169463545 (patch)
treec805e427478c466132252d26ca362ef02767d79a
parent27e6826860b57227d0befb315f66fa6e0b2d9efc (diff)
downloadgtk+-issue-2923.tar.gz
Annotate the expression array as "nullable"issue-2923
While it's a bit dubious whether array+length annotations should be marked as "nullable", we do this elsewhere in the API, so might as well be consistent. In practice, the array argument is only ever allowed to be NULL iff the length argument is 0; annotations are static, so if somebody decides to pass a NULL argument with a non-zero value, they will get a run time critical error, instead of a compile time one, which is somewhat counter to the point of annotating the API in the first place. Fixes: #2923
-rw-r--r--gtk/gtkexpression.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkexpression.c b/gtk/gtkexpression.c
index 574274ea7e..009c2da8c7 100644
--- a/gtk/gtkexpression.c
+++ b/gtk/gtkexpression.c
@@ -1577,7 +1577,7 @@ GTK_DEFINE_EXPRESSION_TYPE (GtkClosureExpression,
* @value_type: the type of the value that this expression evaluates to
* @closure: closure to call when evaluating this expression. If closure is floating, it is adopted
* @n_params: the number of params needed for evaluating @closure
- * @params: (array length=n_params) (transfer full): expressions for each parameter
+ * @params: (nullable) (array length=n_params) (transfer full): expressions for each parameter
*
* Creates a GtkExpression that calls @closure when it is evaluated.
* @closure is called with the @this object and the results of evaluating