From: John L. <jr...@us...> - 2008-01-24 00:18:48
|
Update of /cvsroot/wxlua/wxLua/bindings/wxlua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5955/wxLua/bindings/wxlua Modified Files: override.hpp wxlua.i Log Message: * The wxLua type numbers are now generated when the first wxLuaState is created rather then when the bindings are registered into Lua. This means that each wxLua type stays the same for the life of the program no matter what bindings are installed or in what order. - The copy of the wxLuaBindingList in the wxLuaState was removed since it is no longer needed. Renamed the functions static wxLuaBinding::GetBindXXX() to FindBindXXX() since they no longer needed the extra wxLuaBindingList parameter and they had the same signature as the existing GetBindXXX() functions. - Added wxLuaState::RegisterBinding(wxLuaBinding*) function to register single bindings at a time. You may also reregister bindings, which means that their metatable functions are simple rewritten. Index: wxlua.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/wxlua.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxlua.i 5 Jan 2008 00:15:45 -0000 1.15 --- wxlua.i 24 Jan 2008 00:18:15 -0000 1.16 *************** *** 87,90 **** --- 87,93 ---- %define WXLUA_TINTEGER %define WXLUA_TCFUNCTION + %define WXLUA_TNULL + + %define WXLUA_T_MAX %define LUA_TNONE // (-1) Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** override.hpp 23 Jan 2008 06:43:34 -0000 1.18 --- override.hpp 24 Jan 2008 00:18:15 -0000 1.19 *************** *** 149,158 **** static int LUACALL wxLua_function_GetBindings(lua_State *L) { - wxLuaState wxlState(L); lua_newtable(L); // the table that we return int idx = 1; wxLuaBindingList::compatibility_iterator node; ! for (node = wxlState.GetLuaBindingList()->GetFirst(); node; node = node->GetNext(), idx++) { wxLuaBinding* binding = node->GetData(); --- 149,157 ---- static int LUACALL wxLua_function_GetBindings(lua_State *L) { lua_newtable(L); // the table that we return int idx = 1; wxLuaBindingList::compatibility_iterator node; ! for (node = wxLuaBinding::GetBindingList()->GetFirst(); node; node = node->GetNext(), idx++) { wxLuaBinding* binding = node->GetData(); |