GNOME Bugzilla – Bug 773980
GIR scanner doesn't interpret array type properly
Last modified: 2017-11-28 14:15:07 UTC
I've noticed this problem in GMountOperation (gio) class. Signature of virtual method: void (* ask_question) (GMountOperation *op, const char *message, const char *choices[]); Gio-2.0.gir: <parameter name="choices" transfer-ownership="none"> <type name="utf8" c:type="const char*"/> </parameter> What means, that type of choices is const char*, but not const char*[]. I'd expect to have following nodes in GIR file: <parameter name="choices" transfer-ownership="none"> <array> <type name="utf8" c:type="const char*"/> </array> </parameter>
This needs an annotation to the virtual function in GIO → re-assigning.
(In reply to Emmanuele Bassi (:ebassi) from comment #1) > This needs an annotation to the virtual function in GIO → re-assigning. Are you sure? Looks like a g-ir-scanner bug with handling `[]` array notation.
Created attachment 363669 [details] [review] gmountoperation: Add missing (array) annotations Two of the vfuncs in GMountOperation need some annotations for their element types and array sizes, otherwise g-ir-scanner comes up with nonsense output. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Review of attachment 363669 [details] [review]: ACK-by: me
Attachment 363669 [details] pushed as b16d7fc - gmountoperation: Add missing (array) annotations