After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585427 - A few more tests regarding arrays
A few more tests regarding arrays
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-06-11 11:34 UTC by Simon van der Linden
Modified: 2015-02-07 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tests for array as output argument, and fixed-size arrays (2.59 KB, patch)
2009-06-11 11:35 UTC, Simon van der Linden
needs-work Details | Review
Tests for array as output argument (with argument documentation in the right order), and fixed-size arrays (2.59 KB, patch)
2009-06-11 20:26 UTC, Simon van der Linden
accepted-commit_now Details | Review

Description Simon van der Linden 2009-06-11 11:34:15 UTC
In Everything, there are no tests neither for arrays as output argument, nor for fixed-size arrays.
Comment 1 Simon van der Linden 2009-06-11 11:35:04 UTC
Created attachment 136331 [details] [review]
Tests for array as output argument, and fixed-size arrays
Comment 2 Colin Walters 2009-06-11 18:35:03 UTC
+ * @ints: (out) (array length=n_ints) (transfer full): a list of 5 integers, from 0 to 4 in consecutive order
+ * @n_ints: (out): the length of @ints
+ */
+void
+test_array_int_out (int *n_ints, int **ints)

Either the parameter order or the doc order is backwards (I'd suggest switching the parameters since it seems to be more common for the count to come after the array).

I'm not sure about the fixed-size arrays as parameters/returns.  Do people do that?
Comment 3 Simon van der Linden 2009-06-11 20:26:29 UTC
Created attachment 136360 [details] [review]
Tests for array as output argument (with argument documentation in the right order), and fixed-size arrays

Since in all the other array tests, the count precedes the array, I inverted the arguments in the documentation.
Comment 4 Simon van der Linden 2009-06-11 20:32:26 UTC
(In reply to comment #2)
> I'm not sure about the fixed-size arrays as parameters/returns.  Do people do
> that?

Since it is implemented in GObject-Introspection, I implemented it in PyBank too.

Comment 5 Colin Walters 2009-06-11 20:54:56 UTC
The motivation for the fixed-size arrays was inside C structures I believe.  Anyways looks fine.

Do you have a GNOME account?
Comment 6 Simon van der Linden 2009-06-11 22:14:00 UTC
(In reply to comment #5)
> Do you have a GNOME account?

No, I don't. Please commit for me. Thanks.
Comment 7 André Klapper 2015-02-07 16:53:47 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]