[webkit-dev] Should LChar really being unsigned char? (was Re: SerializedScriptValue: signed vs unsigned char)
Glenn Adams
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.
>
> Close.
>
> 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...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130210/1d0376b3/attachment.html>
More information about the webkit-dev
mailing list