Message74525
| Author |
vstinner |
| Recipients |
amaury.forgeotdarc, vstinner |
| Date |
2008年10月08日.11:15:25 |
| SpamBayes Score |
2.249239e-05 |
| Marked as misclassified |
No |
| Message-id |
<1223464528.82.0.0971986633341.issue3975@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
@amaury: Oops, yes, I introduced a refleak in the version 4 with the
PyUnicode_Check(). Instead of just moved Py_(X)RECREF(lineobj);, I
could not not resist to refactor the code to remove one more
indentation level (I prefer if (...) return; instead of if (...) {
very long block; }).
Changes in version 5:
- rename 'namebuf' buffer to 'buf', it's used for the filename and to
display the indentation space (strcpy(buf, ' ');).
- move Py_DECREF(fob); at the end of the GetLine loop
- return on lineobj error
I think that the new version is easier to read than the current code
because they are few indentation and no more local variables (if (...)
{ local var; ... }) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年10月08日 11:15:28 | vstinner | set | recipients:
+ vstinner, amaury.forgeotdarc |
| 2008年10月08日 11:15:28 | vstinner | set | messageid: <1223464528.82.0.0971986633341.issue3975@psf.upfronthosting.co.za> |
| 2008年10月08日 11:15:28 | vstinner | link | issue3975 messages |
| 2008年10月08日 11:15:27 | vstinner | create |
|