[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: direct access to allocator's void *ud
- From: Rebel Neurofog <rebelneurofog@...>
- Date: Sat, 18 Jun 2011 19:06:34 +0400
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.