A.M. Kuchling added the comment:

serhiy.storchaka: good point!  I wonder if, for strict correctness, we should 
only incref obj (the new object) if set_panel_userptr() returns OK and not an 
error code.  I've attached a new version of the patch that does this check, and 
also adds a test.

(OTOH, looking at the ncurses 5.9 source code, set_panel_userptr() only returns 
an error if the panel object is NULL, which should never happen because Python 
reports an error if the panel creation fails.  So maybe the rc == ERR check is 
pointless.)

----------
Added file: http://bugs.python.org/file30614/userptr_segfault_revised.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18113>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to