lua-users home
lua-l archive

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


That looks great to me. Curious what the Lua authors think
of this?

Regards,
Jim


----- Original Message ----- 
From: "Nick Trout" <Nick.Trout@warthog.co.uk>
Subject: RE: LUA_USERSTATE


| > 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) 
| > 
| 
| I think something like this is more flexible.
| 
| id = lua_registercontext(L);
| lua_setcontextdata(L,id,data);
| 
| ...
| 
| data = lua_getcontextdata(L,id);
| 
| Nick
| 
|