> [Guido] > > Quite apart from whether we should enable xreadlines(), could you look > > into doing a similar thing for MSVC stdio? For most Unix platforms, a > > cop-out answer is "use glibc" -- but for Windows it may pay to do our > > own hack. > > There's no question about whether it would pay on Windows, because it pays > big for Perl on Windows. The question is about cost. There's no way to > *do* it short of the way Perl does it, which is to write a large pile of > Windows-specific code (roughly the same size and complexity as the glibc > getline implementation -- check it out, it's not trivial, and glibc exploits > compiler inlining to make it bearable) relying on reverse-engineered > accidents of how MS happens to use all the fields from this undocumented > struct (from MS's stdio.h): > > struct _iobuf { > char *_ptr; > int _cnt; > char *_base; > int _flag; > int _file; > int _charbuf; > int _bufsiz; > char *_tmpfname; > }; > typedef struct _iobuf FILE; > > in their stdio implementation. Else it won't play correctly with MS's > stdio. That's A Project. Last year I tried extracting the relevant code > from Perl, but, as is usual, gave up after unraveling the third (whatever) > layer of mystery macros with no end in sight. I bet it would take me a > week. Is it worth that much to you and DC? Since the real Windows experts > are hanging out at ActiveState, I bet one of them will volunteer to do it > tonight <wink>. Yeah. That's too much. Too bad. I'm not holding my breath for ActiveState though. :-) --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4