From 49c06de6579d07d8bcae99d3507970e58ad85b5c Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Sun, 7 Jul 2002 12:45:45 +0000 Subject: update to use this function. (ArgMatcher.register_boxed): short circuit if 2002-07-07 James Henstridge * 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 that fixes a reference leak for the argument tuple passed to the callback. (pyg_signal_class_closure_marshal): apply similar fix here. --- gtk/pygtktreemodel.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gtk/pygtktreemodel.c') diff --git a/gtk/pygtktreemodel.c b/gtk/pygtktreemodel.c index 0c464637..eec9c6ad 100644 --- a/gtk/pygtktreemodel.c +++ b/gtk/pygtktreemodel.c @@ -323,6 +323,9 @@ pygtk_generic_tree_model_get_path(GtkTreeModel *tree_model, GtkTreeIter *iter) if (py_ret) { GtkTreePath *path = pygtk_tree_path_from_pyobject(py_ret); + if (!path) + g_warning("could not convert return value of get_tree_path() to " + "a GtkTreePath"); Py_DECREF(py_ret); return path; } else { -- cgit v1.2.1