GNOME Bugzilla – Bug 440059
Bad check for direction "out" parameters with return-type "none"
Last modified: 2008-07-16 10:13:02 UTC
There is an explicit check to see if the return value is Py_None on a virtual method marked return-type "none". This is fine and expected, except when the virtual method has parameters with outbound values. The following in gtk-base.defs: (define-virtual toggle_size_request (of-object "GtkMenuItem") (return-type "none") (parameters '("gint*" "requisition" (direction "out")) ) ) produces a _wrap_GtkMenuItem__proxy_do_toggle_size_request function in gtk.c with the following sequence of code: py_retval = PyObject_CallObject(py_method, NULL); ... if (py_retval != Py_None) { ... } py_retval = Py_BuildValue("(N)", py_retval); The problem here is that the Python method implementing do_toggle_size_request must return the integer value to be stored in the requisition outbound parameter. However, the explicit check to see if py_retval is Py_None gets in the way in this case. This causes problems for many of the functions in atk too.
Sounds like a bug.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
This change broke some applications; please see bug #455468.