lua-users home
lua-l archive

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


For some reason, if I change the #define LUA_NUM_TYPE in lobject.h
to 'long', the Metrowerks 3.0 compiler chokes on the following

in function luaB_call()
*(L->stack.top++) = *luaH_getint(arg, i+1);

in function luaB_foreachi()
*(L->stack.top++) = *luaH_getint(t, i);

The error in both cases is
Error   : internal compiler error: File: 'PCode.c' Line: 425
lbuiltin.c line 304   }

gcc seems to compile it just fine.
switching LUA_NUM_TYPE back to double fixes the problem.

In both functions with Metrowerks, if I move the ++ out and down one
line, like this:

*(L->stack.top) = *luaH_getint(arg, i+1);
L->stack.top++;

That error goes away.

Can someone familiar with these data types double check and let me know
if this is the right thing to do?

--Adam