lua-users home
lua-l archive

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

> On an unrelated sidenote, I noticed LPeg defining `BITSPERCHAR` to 8
> in one of the headers instead of using `CHAR_BITS` from the standard
> which I found a bit unusual.

The definitions of 'setchar' and 'testchar' only work for 8-bit chars,
and their method only work for char sizes that are power of two. Note
that ANSI says that CHAR_BITS must be at least 8, so the whole stuff
should work on any machine (wasting the extra bits).

-- Roberto