The "Win32" readline() hack is now checked in, but there's really nothing Win32-specific about it anymore. It makes one mild assumption about what the C std doesn't clearly address but may have intended: that in case of a non-NULL return, fgets doesn't overwrite any of the buffer positions beyond the terminating null byte (the std is clear that it doesn't overwrite anything at all in case of a NULL-because-EOF return, but I can't say whether they're pointing that out as a consequence, or pointing that out as an exception). I'm curious about how it performs (relative to the getc_unlocked hack) on other platforms. If you'd like to try that, just recompile fileobject.c with USE_MS_GETLINE_HACK #define'd. It should *work* on any platform with fgets() meeting the assumption. The new test_bufio.py std test gives it a pretty good correctness workout, if you're worried about that.
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