I've removed wxLuaStateVariables and everything that goes along with
it. We use the ref counted wxLuaState class that wraps the lua_State
and contains all the necessary state variables. I think this has
really made things much simpler and safer. Since it's ref counted, all
calls to the wxLuaState check if someone has deleted the lua_State and
the all the functions that need to get at the state variables don't
have to incessantly look them up from the lua_State. The
wxLuaInterpreter class just has a wxLuaState as a member.
I've given all the function names in the wxLuaState the same name as
their old C counterparts. There's also some remnants left of them in
the internal.h/cpp file that are there for backwards compatibility.
It compiles and runs in MSW and Linux.
Next TODO: Try to see how to add custom bindings.
I hope people like the new structure, let me know if anything about it
doesn't make sense.
John Labenski
|