GNOME Bugzilla – Bug 652115
Take into account auxiliar arguments when looking for the python callback
Last modified: 2018-01-10 20:09:26 UTC
This patch lacks tests, we should take one of the callback test cases and combine it with one of the array test cases.
Created attachment 189472 [details] [review] Take into account auxiliar arguments when looking for the python callback
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
This patch fix my issues with some telepathy-glib APIs, thanks!
Comment on attachment 189472 [details] [review] Take into account auxiliar arguments when looking for the python callback Needs a test. Any volunteers?
Could someone please give some code sketch which problem this is solving? Thanks!
I guess we need to test calling a method that takes as arguments a callback and an array with an auxiliary length argument.
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 :)
At this point, fixing this would break API and should require explicit enablement. This bug now depends on bug 723736.
*** Bug 726409 has been marked as a duplicate of this bug. ***
-- 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.