GNOME Bugzilla – Bug 650133
Support (skip) annotation for parameters/return-val
Last modified: 2018-01-27 11:48:00 UTC
In bug 649657 we introduced using the (skip) annotation on parameters and return values. It would be good to support that in gjs.
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.
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.
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.
(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
This one will likely need to be rebased on top of current git.
-- 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.