lua-users home
lua-l archive

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


There's a way to attach a pointer (possibly pointing to structure of
several things you will actually use) to lua_State
by passing it to lua_newstate () or by setting it with lua_setallocf ().
After that it can be obtained by using lua_getallocf (). But usually
it is only pointer need.
So I suggest implementing 'void *lua_getallocud (lua_State *L)'
returning only user passed pointer in addition to 'lua_getallocf ()'.
The only reason for this is to make things a little bit faster by
avoiding extraction of unnecessary data.