lua-users home
lua-l archive

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


> > Also, Lua 4.0 does not compile out of the box as C++.
>
> It does (or it should, at least). I mean, Lua 4.0 is correct C++ code.
> You only have to use a C++ compiler.

[Lua 4.0/4.0.1]  I didn't check if this is ANSI C/C++ or not, but Borland
C++ Builder 4.0 generates an error on the different declaration and
definition in lcode.h/lcode.c (the missing/additional NUM_OPCODES size
specifier):

lcode.h, 41:  extern const struct OpProperties {...} luaK_opproperties[];

lcode.c, 650:  const struct OpProperties luaK_opproperties[NUM_OPCODES] =
{...};

Of course this can simply be fixed by adding/removing NUM_OPCODES.

Bye,
Wim