[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LUA_USERSTATE
- From: jim@...
- Date: Wed, 30 Jan 2002 16:12:53 -0600
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