lua-users home
lua-l archive

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


Mike Pall wrote:

For LuaJIT 2.x I've finally thrown in the towel and removed all
mentions of size_t, replaced it with int32_t and made sure that
all data structures are properly limited at 2GB (minus a small
safety margin). I do not think it's that useful to have such large
objects _inside_ the VM. It's much more common to have a pointer
inside a userdata to such a structure, managed outside of the VM
(e.g. a mmap'ed file).

Is this for the Lua source, or for your implementation of
LuaJIT?

I've also converted over everything to C99 types and provide a
stdint.h replacement for the few remaining non-C99-compliant
compilers (MSVC in particular). Made many things much easier ...

While Lua is written in ANSI-C, is it worth considering the
impact of copnverting the source tree to C99 standards so that
the migration to 64 bit systems is clean while still maintaining
compatibility with lua as an embedded language.

I recall the same kind of grief when microcontrollers gradually
migrated from 16 to 32 bit ints and all of the "portable"
C code breaking in mysterious ways...

Ralph