GNOME Bugzilla – Bug 651773
Lenght parameter for returned array is not recognized
Last modified: 2011-06-03 12:03:58 UTC
Out param representing returned array's length is not being picked up. Given the following GIR definition : <method name="get_inlined" c:identifier="e_contact_photo_get_inlined"> <doc xml:whitespace="preserve">Gets the @photo's data. #EContactPhoto.</doc> <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">the inlined image in the</doc> <array length="0" c:type="guchar*"> <type name="guint8" c:type="guchar"/> </array> </return-value> <parameters> <parameter name="len" direction="out" caller-allocates="1" transfer-ownership="full"> <doc xml:whitespace="preserve">the length of the inlined data</doc> <type name="gsize" c:type="gsize*"/> </parameter> </parameters> </method> I get the following Wrong VAPI (the array is NOT null terminated and the array length IS given in the GIR): [CCode (array_length = false, array_null_terminated = true)] public unowned uint8[] get_inlined (out size_t len);
commit 62d49650866540d30088fb6f15b218d55caf2a60 Author: Luca Bruno <lucabru@src.gnome.org> Date: Fri Jun 3 13:54:42 2011 +0200 girparser: Handle array length index for return values Fixes bug 651773. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.