GNOME Bugzilla – Bug 703873
Regression: TypeError when marshaling union members
Last modified: 2013-09-16 08:22:02 UTC
Created attachment 248729 [details] test code The new Gtk.SearchBar [1] reguires a function handle_event() to work, but looks like it fails in Python, saying “TypeError: wrong boxed type”. [1] https://developer.gnome.org/gtk3/3.9/GtkSearchBar.html
Confirmed. A simple example to aid debugging: from gi.repository import Gtk, Gdk searchBar = Gtk.SearchBar() event = Gdk.EventKey() searchBar.handle_event(event)
This is a general regression when marshaling unions similar to bug #707140 and noted in comment bug #707140#c3.
Created attachment 254635 [details] [review] Fix union argument regression when marshaling from python Check for union members when marshaling boxed types from Python. This is a regression caused by stricter type checking added when merging code from pygi-argument.c. Re-add pyg_boxed_check to the same bit of code in addition to __gtype__ checking to avoid a double regression.
Attachment 254635 [details] pushed as ef12049 - Fix union argument regression when marshaling from python