After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 126479 - None iter's in custom TreeModel cause SystemException's
None iter's in custom TreeModel cause SystemException's
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: general
1.99.x/2.0.x
Other All
: Normal major
: ---
Assigned To: Python bindings maintainers
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2003-11-07 23:56 UTC by John Ehresman
Modified: 2005-08-22 12:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to handle None iterator values (4.45 KB, patch)
2003-11-07 23:57 UTC, John Ehresman
none Details | Review

Description John Ehresman 2003-11-07 23:56:55 UTC
If None is returned as an iterator from get_iter in a custom TreeModel
implemented in Python, a SystemException is raised when a call to one of
the other methods is made with the iterator.  This is due to the user_data
field of the iterator being set to NULL when None is returned; then when
the NULL is passed to CallMethod, a SystemException is raised.  I'm
attaching a patch that fixes this by using Py_None when the user_data field
is NULL.
Comment 1 John Ehresman 2003-11-07 23:57:50 UTC
Created attachment 21288 [details] [review]
Patch to handle None iterator values
Comment 2 Johan (not receiving bugmail) Dahlin 2003-12-18 22:49:28 UTC
Fixed in CVS (for both HEAD and the pygtk-2-0 branch)
Comment 3 Johan (not receiving bugmail) Dahlin 2003-12-18 22:52:42 UTC
*** Bug 125172 has been marked as a duplicate of this bug. ***