[PATCH v2] libio: Use __wunderflow in _IO_getwline_info
Andreas Schwab
schwab@suse.de
Tue Sep 29 13:36:38 GMT 2026
On Sep 29 2026, Adhemerval Zanella Netto wrote:
> On 21/09/26 05:24, Shamil Abdulaev wrote:
>> After a buffer refill, _IO_getwline_info reads the first character
>> through __wuflow and handles it on a separate path from the rest of
>> the buffer. When extract_delim is negative, that path calls
>> _IO_sputbackc, the narrow-stream putback, on a wide stream, so it
>
> I wonder whether _IO_sputbackc is the correct call here, and not the
> wide _IO_sputbackwc.
That's one of the points of the patch, it removes that erroneous call.
I think it would make sense to remove the extract_delim parameter from
_IO_getwline and fold _IO_getwline_info into it.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list