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.18:00:04
SpamBayes Score 0.009422514
Marked as misclassified No
Message-id <471A4221.4070504@cheimes.de>
In-reply-to <ca471dc20710200836s6829a4c2l8c589fa69878cb6f@mail.gmail.com>
Content
Guido van Rossum wrote:
> You're right that a lot of this could be avoided if we used file
> descriptors consistently. It seems find_module() itself doesn't read
> the file; it just needs to know that it's possible to open the file.
> 
> Rewriting everywhere that uses PyFile_FromFile[Ex] to use file
> descriptors doesn't seem too hard; there are only a few places.

If I understand you right you want to alter the interface of
PyFile_FromFile and PyFile_FromFileEx from

PyFile_FromFileEx(FILE *fp, char *name, char *mode, int (*close)(FILE*),
int buffering, char *encoding, char *newline)

to

PyFile_FromFileEx(int fd, char *name, char *mode, int (*close)(FILE*),
int buffering, char *encoding, char *newline)

?

I could write a patch and remove int (*close)(FILE*), too. It's no
longer used by the functions.

Christian
History
Date User Action Args
2007-10-20 18:00:05christian.heimessetspambayes_score: 0.00942251 -> 0.009422514
recipients: + christian.heimes, gvanrossum, brett.cannon
2007-10-20 18:00:04christian.heimeslinkissue1267 messages
2007-10-20 18:00:04christian.heimescreate