Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, vstinner
Date 2008-10-08.00:07:32
SpamBayes Score 1.97018e-07
Marked as misclassified No
Message-id <1223424456.32.0.970274893416.issue3975@psf.upfronthosting.co.za>
In-reply-to
Content
One last thing: there is a path where lineobj is not freed (when PyUnicode_Check(lineobj) is false); I suggest to move 
Py_XDECREF(lineobj) just before the final return statement.
Reference counting is fun ;-)

> Should I stop on the first error instead of using PyErr_Clear()?
> I would like to display the traceback even if an function failed.
You are right. Common failures should clear the error and return 0.
In your patch, there is one remaining place, the call to PyFile_GetLine().

More fun will arise when my Windows terminal (encoding=cp1252) will try 
to display Chinese characters. Let's pretend this is yet another issue.
History
Date User Action Args
2008-10-08 00:07:41amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, vstinner
2008-10-08 00:07:36amaury.forgeotdarcsetmessageid: <1223424456.32.0.970274893416.issue3975@psf.upfronthosting.co.za>
2008-10-08 00:07:35amaury.forgeotdarclinkissue3975 messages
2008-10-08 00:07:32amaury.forgeotdarccreate