[gimp] libgimpbase: fix gimp_parasite_new() annotation.



commit c3cfab2477ffd9720984a389ab2814508717efe6
Author: Jehan <jehan girinstud io>
Date:   Wed Apr 7 00:10:14 2021 +0200

    libgimpbase: fix gimp_parasite_new() annotation.
    
    Without the (element-type), parasite cannot be created in at least
    PyGObject binding (I have not tested parasite creation in other
    bindings) and we end up with such error:
    
    > ValueError: Pointer arguments are restricted to integers, capsules, and None. See: 
https://bugzilla.gnome.org/show_bug.cgi?id=683599
    
    With this change, we can create it from a list of ints (e.g. for a text,
    encode it into UTF-8 bytes).

 libgimpbase/gimpparasite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libgimpbase/gimpparasite.c b/libgimpbase/gimpparasite.c
index e258a173f9..f267f13433 100644
--- a/libgimpbase/gimpparasite.c
+++ b/libgimpbase/gimpparasite.c
@@ -215,7 +215,7 @@ gimp_parasite_print (GimpParasite *parasite)
  * @name:  the new #GimpParasite name.
  * @flags: see libgimpbase/gimpparasite.h macros.
  * @size:  the size of @data, including a terminal %NULL byte if needed.
- * @data:  (nullable): the data to save in a parasite.
+ * @data:  (nullable) (array length=size) (element-type char): the data to save in a parasite.
  *
  * Creates a new parasite and save @data which may be a proper text (in
  * which case you may want to set @size as strlen(@data) + 1) or not.


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