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 652115 - Take into account auxiliar arguments when looking for the python callback
Take into account auxiliar arguments when looking for the python callback
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 726409 (view as bug list)
Depends on: 723736 727004
Blocks:
 
 
Reported: 2011-06-08 13:58 UTC by Tomeu Vizoso
Modified: 2018-01-10 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Take into account auxiliar arguments when looking for the python callback (2.31 KB, patch)
2011-06-08 13:58 UTC, Tomeu Vizoso
needs-work Details | Review

Description Tomeu Vizoso 2011-06-08 13:58:42 UTC
This patch lacks tests, we should take one of the callback test cases
and combine it with one of the array test cases.
Comment 1 Tomeu Vizoso 2011-06-08 13:58:44 UTC
Created attachment 189472 [details] [review]
Take into account auxiliar arguments when looking for the python callback
Comment 2 Xavier Claessens 2011-06-08 14:13:20 UTC
Review of attachment 189472 [details] [review]:

::: gi/pygi-callbacks.c
@@ +192,3 @@
+            if (length_arg_pos >= 0 && length_arg_pos < callback_index) {
+                py_callback_index--;
+                if (user_data_index != G_MAXUINT8)

you also need to verify length_arg_pos < user_data_index
Comment 3 Xavier Claessens 2011-06-08 14:13:57 UTC
This patch fix my issues with some telepathy-glib APIs, thanks!
Comment 4 Tomeu Vizoso 2012-01-24 15:48:45 UTC
Comment on attachment 189472 [details] [review]
Take into account auxiliar arguments when looking for the python callback

Needs a test. Any volunteers?
Comment 5 Martin Pitt 2012-04-09 13:44:09 UTC
Could someone please give some code sketch which problem this is solving? Thanks!
Comment 6 Tomeu Vizoso 2012-04-10 07:29:30 UTC
I guess we need to test calling a method that takes as arguments a callback and an array with an auxiliary length argument.
Comment 7 Simon Feltman 2013-10-20 03:37:05 UTC
Unfortunately fixing this now could be a fairly large API break. I think we should eventually fix it, but for the 3.x series it would probably need explicit enablement (like Pythons __future__ import:

gi.enable('implicit_callack_aux_args')

Less hideous suggestions welcome :)
Comment 8 Simon Feltman 2014-02-06 03:50:46 UTC
At this point, fixing this would break API and should require explicit enablement. This bug now depends on bug 723736.
Comment 9 Simon Feltman 2014-03-15 20:04:46 UTC
*** Bug 726409 has been marked as a duplicate of this bug. ***
Comment 10 GNOME Infrastructure Team 2018-01-10 20:09:26 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/pygobject/issues/17.