[PATCH 3/3] ungetwc: Guarantee single char pushback

Florian Weimer fweimer@redhat.com
Thu Nov 28 15:19:46 GMT 2024


* Siddhesh Poyarekar:

> The C standard requires that ungetwc guarantees at least one pushback,
> so put a single byte pushback buffer in the _wide_data struct to enable
> that.

I think it's possible to call ungetwc on an unoriented stream, so a fix
will have to deal with a _wide_data allocation failure, too.

Thanks,
Florian



More information about the Libc-alpha mailing list