Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 97460 Details for
Bug 148247
pygtk 2.10.1 breaks gtk_tree_model_iter_next()
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
pygtk-2.10.1-iter-fix.patch
pygtk-2.10.1-iter-fix.patch (text/plain), 3.75 KB, created by
rajas
on 2006-09-19 14:31:23 UTC
(
hide
)
Description:
pygtk-2.10.1-iter-fix.patch
Filename:
MIME Type:
Creator:
rajas
Created:
2006-09-19 14:31:23 UTC
Size:
3.75 KB
patch
obsolete
>Fixes Gnome Bug http://bugzilla.gnome.org/347273 >=================================================================== >RCS file: /cvs/gnome/pygtk/gtk/gtkobject-support.c,v >retrieving revision 1.22 >retrieving revision 1.23 >diff -u -r1.22 -r1.23 >--- gtk/gtkobject-support.c 2006/06/14 08:19:12 1.22 >+++ gtk/gtkobject-support.c 2006/09/16 14:27:43 1.23 >@@ -120,3 +120,19 @@ > return list; > } > >+void >+pygtk_boxed_unref_shared(PyObject *boxed) >+{ >+ PyGBoxed *pyboxed; >+ g_return_if_fail(boxed != NULL && PyObject_TypeCheck(boxed, &PyGBoxed_Type)); >+ pyboxed = (PyGBoxed *) boxed; >+ if (pyboxed->ob_refcnt != 1) { >+ if (!pyboxed->free_on_dealloc) { >+ pyboxed->boxed = g_boxed_copy(pyboxed->gtype, >+ pyboxed->boxed); >+ pyboxed->free_on_dealloc = TRUE; >+ } >+ } >+ Py_DECREF(boxed); >+} >+ >=================================================================== >RCS file: /cvs/gnome/pygtk/gtk/pygtk-private.h,v >retrieving revision 1.33 >retrieving revision 1.34 >diff -u -r1.33 -r1.34 >--- gtk/pygtk-private.h 2006/06/14 08:19:12 1.33 >+++ gtk/pygtk-private.h 2006/09/16 14:27:43 1.34 >@@ -70,4 +70,6 @@ > #define PYGDK_TYPE_REGION (pygdk_region_get_type ()) > #endif /* GDK_TYPE_REGION */ > >+void pygtk_boxed_unref_shared(PyObject *boxed); >+ > #endif >=================================================================== >RCS file: /cvs/gnome/pygtk/gtk/pygtkcellrenderer.c,v >retrieving revision 1.12 >retrieving revision 1.13 >diff -u -r1.12 -r1.13 >--- gtk/pygtkcellrenderer.c 2005/01/09 17:35:02 1.12 >+++ gtk/pygtkcellrenderer.c 2006/09/16 14:27:43 1.13 >@@ -250,7 +250,7 @@ > Py_DECREF(py_ret); > > out: >- Py_DECREF(py_event); >+ pygtk_boxed_unref_shared(py_event); > Py_DECREF(py_widget); > Py_DECREF(py_background_area); > Py_DECREF(py_cell_area); >=================================================================== >RCS file: /cvs/gnome/pygtk/gtk/gtktreeview.override,v >retrieving revision 1.73 >retrieving revision 1.74 >diff -u -r1.73 -r1.74 >--- gtk/gtktreeview.override 2006/07/19 20:08:28 1.73 >+++ gtk/gtktreeview.override 2006/09/16 14:27:43 1.74 >@@ -579,6 +579,7 @@ > } > %% > override gtk_tree_selection_selected_foreach >+ > static void > pygtk_tree_selection_foreach_marshal(GtkTreeModel *model, > GtkTreePath *path, >@@ -597,17 +598,17 @@ > py_path = pygtk_tree_path_to_pyobject(path); > py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, FALSE, FALSE); > if (cunote->data) >- retobj = PyEval_CallFunction(cunote->func, "(NNNO)", >+ retobj = PyEval_CallFunction(cunote->func, "(NNOO)", > py_model, py_path, py_iter, > cunote->data); > else >- retobj = PyEval_CallFunction(cunote->func, "(NNN)", >+ retobj = PyEval_CallFunction(cunote->func, "(NNO)", > py_model, py_path, py_iter); > > if (retobj == NULL) { > PyErr_Print(); > } >- >+ pygtk_boxed_unref_shared(py_iter); > Py_XDECREF(retobj); > > pyg_gil_state_release(state); >@@ -1124,13 +1125,14 @@ > py_iter2 = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter2, FALSE, FALSE); > > if (cunote->data) { >- retobj = PyEval_CallFunction(cunote->func, "(NNNO)", py_model, >+ retobj = PyEval_CallFunction(cunote->func, "(OONO)", py_model, > py_iter1, py_iter2, cunote->data); > } else { >- retobj = PyEval_CallFunction(cunote->func, "(NNN)", py_model, >+ retobj = PyEval_CallFunction(cunote->func, "(OON)", py_model, > py_iter1, py_iter2); > } >- >+ pygtk_boxed_unref_shared(py_iter1); >+ pygtk_boxed_unref_shared(py_iter2); > if (retobj) > ret = PyInt_AsLong(retobj); > if (PyErr_Occurred()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 148247
: 97460 |
97461