This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients brett.cannon, christian.heimes, gvanrossum
Date 2007-10-20.21:12:30
SpamBayes Score 0.090210706
Marked as misclassified No
Message-id <471A6F3C.4030606@cheimes.de>
In-reply-to <ca471dc20710200836s6829a4c2l8c589fa69878cb6f@mail.gmail.com>
Content
> The dangers of switching between fileno(fp) and fp are actually well
> documented in the C and/or POSIX standards. The problem is caused in
> PyFile_FromFileEx() -- it creates a Python file object from the file
> descriptor. The fix actually only works because we're not using the
> FILE struct once PyTokenizer_FindEncoding() is called. I think it
> would be better to move the lseek() into call_find_module() so the
> FILE abstraction is not broken by PyTokenizer_FindEncoding().

FYI:

http://www.gnu.org/software/libc/manual/html_mono/libc.html#Stream_002fDescriptor-Precautions
http://www.gnu.org/software/libc/manual/html_mono/libc.html#Cleaning-Streams

Christian
History
Date User Action Args
2007-10-20 21:12:30christian.heimessetspambayes_score: 0.0902107 -> 0.090210706
recipients: + christian.heimes, gvanrossum, brett.cannon
2007-10-20 21:12:30christian.heimeslinkissue1267 messages
2007-10-20 21:12:30christian.heimescreate