GNOME Bugzilla – Bug 644927
Support out parameters in signals
Last modified: 2018-01-10 20:07:09 UTC
We need to support out parameters in signals similarly to how they are handled in vfuncs. A signal that is hooked up via a vfunc works correctly but using connect, it will try and send the out variables in like it does in C. The example in bug #644926 shows the issue with the to-embedder and from-embedder signals.
Note: This could potentially be fixed in http://git.gnome.org/browse/pygobject/commit/?id=ecd235959317d3 The example in bug 644926 does not work any more, so I guess we should write a test case for this.
bug 665551 show an example of a crashing out argument.
*** Bug 708676 has been marked as a duplicate of this bug. ***
*** Bug 665551 has been marked as a duplicate of this bug. ***
*** Bug 741356 has been marked as a duplicate of this bug. ***
Overriding virtual methods with out parameters (e.g. Gtk.SpinButton.do_input) has the same problem: the parameter is treated as an in parameter pointing to the value. Is that a separate bug, or can it be tackled together with this one?
This issue currently blocks porting PyGTK apps to Gtk3/PyGI. For PyGTK, it was possible to handle the SpinButton "input" signal with a ctypes hack (see http://stackoverflow.com/questions/4827831/how-to-change-display-in-gtk-spinbutton), but this seems no longer to work with PyGI. A proper solution for handling output parameters in signals and/or virtual methods would be most welcome!
-- 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/12.