2009/12/13 Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br>
> So you are saying that a configure script which sets up Lua before compiling
> the library and does not check that types are large enough to pass a
> standard type and retrieve the same type is not a bug?
Lua does not use a configure script. There is no automatic setup.
Lua uses a config header file that you're supposed to check and edit
to suit your platform. The relevant section in luaconf.h is
I apologise, I just take it for granted that most libraries use configure scrips. sorry.
/*
@@ LUA_INTEGER is the integral type used by lua_pushinteger/lua_tointeger.
** CHANGE that if ptrdiff_t is not adequate on your machine. (On most
** machines, ptrdiff_t gives a good choice between int or long.)
*/
#define LUA_INTEGER ptrdiff_t
I guess the comment should make it clear that LUA_INTEGER should limit
integers to what can be stored without loss in a LUA_NUMBER.