Message74499
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. |
|
Date |
User |
Action |
Args |
2008-10-08 00:07:41 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, vstinner |
2008-10-08 00:07:36 | amaury.forgeotdarc | set | messageid: <1223424456.32.0.970274893416.issue3975@psf.upfronthosting.co.za> |
2008-10-08 00:07:35 | amaury.forgeotdarc | link | issue3975 messages |
2008-10-08 00:07:32 | amaury.forgeotdarc | create | |
|