Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

> > Not only in these functions, but anywhere "dummy=" is followed by a
> > Py_XDECREF(dummy);
> 
> Please, clarify this. I don't see your point.

If dummy is NULL, a pending exception has been set (with PyErr_SetString
or another similar function). If you simply ignore this, your function
will return a valid object, but PyErr_Occurred() returns True. This is
not correct and will fail in subtle ways (like with gc.collect()); in
debug mode, a message "XXX undetected error" is printed.
You must either clear the exception, or return NULL from your function.

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3885>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to