lua-users home
lua-l archive

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


On Saturday 18, Rebel Neurofog wrote:
> 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.

There was a thread recently on the list about this:
http://lua-users.org/lists/lua-l/2011-04/msg00051.html

A few different methods where discussed.

-- 
Robert G. Jakabosky