lua-users home
lua-l archive

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


Please allow me to pose the following suggestion to the developers of Lua 5.2.
It concerns the parametrization of the type used for indexing.

In the Lua Reference manual I find defined:
typedef ptrdiff_t lua_Integer;
typedef double lua_Number;

However there is no corresponding typedef for indices. For example in "void lua_rawgeti (lua_State *L, int index, int n)" one find the int. It is also used to access the lua stack.

I would plea for using a typedef here too. Especially because int is notouriously "vague" and its size can vary from system to system. It does not matter too much what representation is chosen, as long as it is adaptable in luaconf.h

Hans van der Meer