lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



For me, without having seen that code, "sizeof(char)" is commentary code meaning same as "(size_t)1", basically.

That is, I'd vote for having such clarity, even if it functionally is equivalent to just the intergers. :)

-asko

Mike Pall kirjoitti 9.1.2006 kello 20.59:

BTW: Speaking of types and sizes ... anyone noticed sizeof(char)
sprinkled throughout the source? Funny enough, but this doesn't
accomplish anything. sizeof(char) is _always_ 1 (that's how
sizeof quantities are defined). One realls wants to check
CHAR_BIT (but the Lua core doesn't). I have some doubts that Lua
works on systems where this is not 8. So one might as well remove
the superfluous code.