summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2002-07-07 12:45:43 +0000
committerJames Henstridge <jamesh@src.gnome.org>2002-07-07 12:45:43 +0000
commit4e20227a58deb774e23c2fcb2d7e2135526a05fc (patch)
treed484b418cfac0397d1d1f2b96f5ad6219384f29f
parent3a1d9c9029779bdf632474d29db9a703194292b6 (diff)
downloadpygobject-4e20227a58deb774e23c2fcb2d7e2135526a05fc.tar.gz
pygobject-4e20227a58deb774e23c2fcb2d7e2135526a05fc.tar.xz
pygobject-4e20227a58deb774e23c2fcb2d7e2135526a05fc.zip
update to use this function. (ArgMatcher.register_boxed): short circuit if
2002-07-07 James Henstridge <james@daa.com.au> * codegen/argtypes.py (GtkTreePathArg.write_return): update to use this function. (ArgMatcher.register_boxed): short circuit if there is already a handler for the boxed type (helps with setting custom handlers for boxed types). * gtk/gtk-types.c (pygdk_rectangle_from_pyobject): new function to parse a GdkRectangle from a PyObject. * gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path): print a warning if the return value could not be converted to a GtkTreePath. * gtk/gtk.override (_wrap_gtk_tree_model_get_value): don't assume tree paths are tuples. * codegen/argtypes.py (GtkTreePathArg.write_param): fix up code generator to get rid of assumption that tree paths are tuples, and catch case where pygtk_tree_path_from_pyobject() returns NULL. * gtk/gtk-types.c (pygtk_tree_path_from_pyobject): change so that we treat an integer PyObject as a tree path with a single index. * pygtype.c (pyg_closure_marshal): apply patch from Arjan Molenaar <arjanmolenaar@hetnet.nl> that fixes a reference leak for the argument tuple passed to the callback. (pyg_signal_class_closure_marshal): apply similar fix here.
-rw-r--r--gobject/pygtype.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gobject/pygtype.c b/gobject/pygtype.c
index 36256b7..9db7990 100644
--- a/gobject/pygtype.c
+++ b/gobject/pygtype.c
@@ -675,11 +675,13 @@ pyg_closure_marshal(GClosure *closure,
if (ret == NULL) {
PyErr_Print();
PyErr_Clear();
+ Py_DECREF(params);
pyg_unblock_threads();
return;
}
if (return_value)
pyg_value_from_pyobject(return_value, ret);
+ Py_DECREF(params);
Py_DECREF(ret);
pyg_unblock_threads();
}
@@ -789,10 +791,12 @@ pyg_signal_class_closure_marshal(GClosure *closure,
PyErr_Print();
PyErr_Clear();
Py_DECREF(method);
+ Py_DECREF(params);
pyg_unblock_threads();
return;
}
Py_DECREF(method);
+ Py_DECREF(params);
if (return_value)
pyg_value_from_pyobject(return_value, ret);
Py_DECREF(ret);