This is the top half of the callback function in libglademodule.c, the one
that libglade calls when it receives a signal connected with autoconnect.
static void connect_many(const gchar *handler_name, GtkObject *obj,
const gchar *signal_name, const gchar *signal_data,
GtkObject *connect_object, gboolean after,
gpointer user_data) {
PyObject *handler_dict = user_data;
PyObject *callback;
callback = PyDict_GetItemString(handler_dict, (gchar *)handler_name);
if (!callback) {
PyErr_Clear();
return;
}
if (!PyCallable_Check(callback))
return;
if (connect_object) {
PyObject *func, *extra, *other;
other = PyGtk_New(connect_object);
if (PyTuple_Check(callback)) {
func = PyTuple_GetItem(callback, 0);
extra = PyTuple_GetItem(callback, 1);
...
Unless I'm much misstaken, there is a bug here. First we do:
if (!PyCallable_Check(callback))
return;
But then we do:
if (PyTuple_Check(callback)) {
func = PyTuple_GetItem(callback, 0);
extra = PyTuple_GetItem(callback, 1);
How can we expect callback to be a tuple when we just rejected everything
but Callables?
Anders "Quest" Qvist
NetGuide Scandinavia
And we who listen to the sky, or walk the dusty grade,
Or break the very atoms down, to see how they are made,
Or study cells, or living things, seek truth with open hand;
The profoundest act of worship is to try to understand.
-- Catherine Faber, "The Word of God"
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]