Message80296
| Author |
pitrou |
| Recipients |
pitrou, vstinner |
| Date |
2009年01月20日.23:40:33 |
| SpamBayes Score |
2.929823e-12 |
| Marked as misclassified |
No |
| Message-id |
<1232494857.6061.12.camel@localhost> |
| In-reply-to |
<1232494241.37.0.791971329332.issue5008@psf.upfronthosting.co.za> |
| Content |
> I use the type "long" to store the lseek() result, because I don't
> know if off_t is available on all OS. Py_off_t may be used, but it's
> defined above (after fileio_init).
Instead of checking the return type, you can first set errno to 0, and
then check errno after the function returns.
> fileio_seekable() uses the
> type "int" for lseek() result, which looks worse than long :-)
Nice catch! http://bugs.python.org/issue5016
PS : about the patch, "0 < f.tell()" is really strange coding style...
"f.tell() > 0" looks much more consistent with the rest of the Python
code base |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年01月20日 23:40:34 | pitrou | set | recipients:
+ pitrou, vstinner |
| 2009年01月20日 23:40:33 | pitrou | link | issue5008 messages |
| 2009年01月20日 23:40:33 | pitrou | create |
|