[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Setting the lua environment
- From: Martin Slater <mslater@...>
- Date: Wed, 29 Jun 2005 08:32:01 +1000
Richard Ranft wrote:
Thanks for that one then;) Unfotuanetly isn't really possible, the whole
thing is based on dll's which bind there functions on initialisation and
its the script which manages everything from there, I could maybe keep a
global stack c side so every call of the convert function it overwrites
and restores the globals on exit, in fact this may be a lot simpler than
trying to figure out the rather sparsely document lua_setfenv and
accompanying code needed.
Is there some way to accomodate this from your script manager on the C++
side? If you use an object for each instance of the script in your manager
you could keep what info you needed with each script object, and pass on
what the next object will need to it when it is instantiated. I think this
would work and it would avoid stomping on the global environment.
Just a thought... I don't have many of them.