[issue4465] The result of set_copy() is not checked for NULL

Mark Dickinson report at bugs.python.org
Sat Nov 29 18:31:10 CET 2008


Mark Dickinson <dickinsm at gmail.com> added the comment:

I believe the code is correct as it is.  The relevant lines are in
set_intersection:

	if ((PyObject *)so == other)
		return set_copy(so);

If the result of the set_copy is NULL then the NULL is passed directly 
back to the calling routine;  this is as it should be.  A NULL coming from 
set_copy indicates that an exception occurred; this is then passed on to 
the calling routine so that the calling routine is aware of the exception.

If you haven't already done so, please take a look at

http://docs.python.org/dev/c-api/index.html

especially the section on exception handling.

----------
nosy: +marketdickinson
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4465>
_______________________________________


More information about the Python-bugs-list mailing list