Message56610
| Author |
gvanrossum |
| Recipients |
brett.cannon, christian.heimes, gvanrossum |
| Date |
2007年10月20日.19:59:25 |
| SpamBayes Score |
0.2119965 |
| Marked as misclassified |
No |
| Message-id |
<ca471dc20710201259g6eb69e2ft68bab0a82694359b@mail.gmail.com> |
| In-reply-to |
<471A5A1B.80500@cheimes.de> |
| Content |
> Guido, Brett, how much of the code should I change? import.c is mainly
> using file pointers. Should I replace all operations on FILE with
> operations on a file descriptor?
I think find_module() should return a file descriptor (fd), not a
FILE*, but most of the rest of the code should call fdopen() on that
fd. Only call_find_module() should use the fd to turn it into a Python
file object. Then the amount of change should be pretty minimal.
I recommend changing the name of the API used to turn a fd into file
object while we're at it; that's one of the few guidelines we have for
C API changes. |
|