[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: mochalua newState and luaL_openlibs causing problems
- From: Raymond Jacobs <raymondj@...>
- Date: Mon, 14 Dec 2009 20:57:09 -0500
I wanted to point out that I am having an issue using mochalua;
I see folks talking about it here occasionally so maybe someone can shed some light.
I was running into an issue where I would first create a lua_State, then execute luaL_openlibs;
however if you subsequently create a new lua_State and execute luaL_openlibs again; it fails to open the libs in the new state.
after a lot of digging, i found that the lua_registry is implemented as a static 'global' in class LVM;
meaning that the registry seems to maintain knowledge beyond a lua_State;
it keeps the knowledge that I've previously loaded the libraries and so doesnt load them properly again; at least that is my best guess.
has anyone ran into such an issue? and perhaps has a workaround?
unfortunetly the class LVM is not publicly accesable so I can't manually reset m_registry; unless I compile it from source which I may have to.
there also seems to be a reinit() function defined in LVM; this seems to show that there was intent to allow resetting of this.
if any more information is needed please let me know.
Ethereal Darkness Interactive