lua-users home
lua-l archive

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


So after using this a little and also in lea of the discussion on
libraries - wouldn't a functional interface be a better
solution? One that can accept multiple user contexts referenced
by id? I'm also having to include lstate.h so I can reference my 
user context. (I'm using the first work release) 

as an alternate solution - for example:

id = lua_setuserctx( L, (void*) p );

p (mycontext*) = lua_getuserctx( L, id );

and in the state structure something like:

#define MAXUSERCTX 10

lua_State {
..
void* userctx[MAXUSERCTX];
};

Jim