Message56608
| Author |
brett.cannon |
| Recipients |
brett.cannon, christian.heimes, gvanrossum |
| Date |
2007年10月20日.18:50:25 |
| SpamBayes Score |
0.0091948435 |
| Marked as misclassified |
No |
| Message-id |
<bbaeab100710201150x3f778129m94f31e09e240e48d@mail.gmail.com> |
| In-reply-to |
<471A4221.4070504@cheimes.de> |
| Content |
On 10/20/07, Christian Heimes <report@bugs.python.org> wrote:
>
> Christian Heimes added the comment:
>
> 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.
Yes, I think you got it.
-Brett |
|