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 650133 - Support (skip) annotation for parameters/return-val
Support (skip) annotation for parameters/return-val
Status: RESOLVED OBSOLETE
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-13 18:28 UTC by David Zeuthen (not reading bugmail)
Modified: 2018-01-27 11:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (6.32 KB, patch)
2011-05-14 00:46 UTC, David Zeuthen (not reading bugmail)
reviewed Details | Review

Description David Zeuthen (not reading bugmail) 2011-05-13 18:28:48 UTC
In bug 649657 we introduced using the (skip) annotation on parameters and return values. It would be good to support that in gjs.
Comment 1 David Zeuthen (not reading bugmail) 2011-05-14 00:46:43 UTC
Created attachment 187798 [details] [review]
Proposed patch

Here's a patch to do that including tests - it depends on gobject-introspection HEAD. Thanks for any review.
Comment 2 David Zeuthen (not reading bugmail) 2011-05-24 12:57:15 UTC
Patch still applies (and works) - any chance someone can review this?

As mentioned in the linked bug, gnome-shell will use API with this annotation for 3.2 - so if we don't add this feature to gjs by 3.2, adding it later will break gnome-shell.
Comment 3 Colin Walters 2011-05-24 13:17:44 UTC
Review of attachment 187798 [details] [review]:

::: gi/function.c
@@ +1143,2 @@
         if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
             function->js_out_argc += 1;

Why aren't you checking is_skip here?  Then js_out_argc would be right, and you wouldn't need to override it inside gjs_invoke_c_function.
Comment 4 David Zeuthen (not reading bugmail) 2011-05-24 14:06:06 UTC
(In reply to comment #3)
> Review of attachment 187798 [details] [review]:
> 
> ::: gi/function.c
> @@ +1143,2 @@
>          if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
>              function->js_out_argc += 1;
> 
> Why aren't you checking is_skip here?  Then js_out_argc would be right, and you
> wouldn't need to override it inside gjs_invoke_c_function.

It's because the C function still expects the out argument - see e.g.

 http://git.gnome.org/browse/gobject-introspection/tree/tests/scanner/regress.c#n2107
Comment 5 Colin Walters 2011-06-17 18:16:26 UTC
This one will likely need to be rebased on top of current git.
Comment 6 GNOME Infrastructure Team 2018-01-27 11:48:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gjs/issues/59.