GNOME Bugzilla – Bug 758019
girwriter: Missing length-parameters of arrays with rank > 1
Last modified: 2017-06-22 06:49:31 UTC
Other places in the GIR file, if a variable is an array, the <array length="x"> tag uses x to indicate the number of dimensions of that variable. In this case, the input parameter for a method only get a tag where x=1, even for 2D and higher arrays. Furthermore, it lists the incorrect number of input parameters, "a_length2" is not present, nor is "result_length2" for the return value. Vala code from an object: public float[,] nd_test(float[,] a){ return a; } Function def in header file: gfloat* foo_input_buffer_nd_test (fooInputBuffer* self, gfloat* a, int a_length1, int a_length2, int* result_length1, int* result_length2); GIR entry: <method name="nd_test" c:identifier="foo_input_buffer_nd_test"> <return-value transfer-ownership="full"> <array length="2"> <type name="gfloat" c:type="gfloat"/> </array> </return-value> <parameters> <parameter name="a" transfer-ownership="none"> <array length="1"> <type name="gfloat" c:type="gfloat"/> </array> </parameter> <parameter name="a_length1" transfer-ownership="none"> <type name="gint" c:type="gint"/> </parameter> <parameter name="result_length1" direction="out" transfer-ownership="none"> <type name="gint" c:type="gint*"/> </parameter> </parameters> </method> I believe the parameter should read <array length="2"> (as it does for the return-value) and there should be additional parameters a_length2 and return_length2.
Created attachment 354170 [details] [review] girwriter: Write length-parameters of arrays with rank > 1
Attachment 354170 [details] pushed as 7b7f67c - girwriter: Write length-parameters of arrays with rank > 1