[webkit-dev] Should LChar really being unsigned char? (was Re: SerializedScriptValue: signed vs unsigned char)
glenn at skynav.com
Sun Feb 10 12:59:10 PST 2013
On Sun, Feb 10, 2013 at 11:38 AM, Darin Adler <darin at apple.com> wrote:
> Short answer, yes.
> On Feb 10, 2013, at 9:14 AM, Glenn Adams <glenn at skynav.com> wrote:
> > Because LChar is often (always?) UTF-8 encoded, the individual encoding
> units of which are 0x00 through 0xFF.
> LChar is always Latin-1 encoded. That’s what the "L" is for. That’s the
> same thing as the first 256 code points in Unicode.
thanks for that correction
> If LChar could possibly be a signed byte, then we’d have to cast to an
> unsigned byte at every call site where we are storing an LChar in a UChar;
> very easy to get that wrong. Since LChar is an unsigned type we can simply
> do a normal assignment and we get correct behavior.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev