From: John L. <jr...@us...> - 2007-12-07 02:13:43
|
Update of /cvsroot/wxlua/wxLua/bindings/wxlua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12976/wxLua/bindings/wxlua Modified Files: override.hpp wxlua.i Log Message: Too many changes to list... A large portion of the internal workings of the wxLuaState have been rewritten. All of the data that was stored in wxLuaStateData that might be needed by a function taking a lua_State* is now in the LUA_REGISTRYINDEX. C functions have been added to access these values. The generated bindings no longer need to have "wxLuaState wxlState(L);" since everything can be done with the C functions. The result is that wxLua should be faster. Index: wxlua.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/wxlua.i,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxlua.i 17 Nov 2007 00:14:55 -0000 1.9 --- wxlua.i 7 Dec 2007 02:13:09 -0000 1.10 *************** *** 41,49 **** // Get a table of all tracked wxEvent callbacks that have been installed using // wxEvtHandler::Connect(...) ! // Example output : { ["wxEVT_COMMAND_TOOL_CLICKED"] = 2, ... } %function LuaTable GetTrackedEventCallbacks() // Get a table of all wxWindow derived classes that have been created in wxLua. ! // Example output : { ["wxFrame"] = 1, ["wxButton"] = 4 } %function LuaTable GetTrackedWindows() --- 41,49 ---- // Get a table of all tracked wxEvent callbacks that have been installed using // wxEvtHandler::Connect(...) ! // "wxEVT_XXX(evt#) -> wxLuaCallback(&callback, ids %d %d)|wxEvtHandler(&evthandler) -> wxEvtHandlerClassName" %function LuaTable GetTrackedEventCallbacks() // Get a table of all wxWindow derived classes that have been created in wxLua. ! // "wxWindowClassName(&win, id=%d)|wxLuaDestroyCallback(&callback)" %function LuaTable GetTrackedWindows() Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** override.hpp 5 Dec 2007 05:54:11 -0000 1.10 --- override.hpp 7 Dec 2007 02:13:09 -0000 1.11 *************** *** 37,53 **** { wxLuaState wxlState(L); ! wxArrayString strArr = wxlState.GetTrackedWindowStrings(); ! size_t n, count = strArr.GetCount(); ! long val = 0; ! lua_createtable(L, 0, count); ! ! for (n = 0; n < count; ++n) ! { ! lua_pushstring(L, wx2lua(strArr[n].BeforeLast(wxT(' ')))); ! strArr[n].AfterLast(wxT(' ')).ToLong(&val); ! lua_pushnumber(L, (double)val); ! lua_rawset(L, -3); ! } ! return 1; } --- 37,41 ---- { wxLuaState wxlState(L); ! wxlua_pushwxArrayStringtable(L, wxlState.GetTrackedWindowStrings()); return 1; } *************** *** 59,75 **** { wxLuaState wxlState(L); ! wxArrayString strArr = wxlState.GetTrackedObjectStrings(); ! size_t n, count = strArr.GetCount(); ! long val = 0; ! lua_createtable(L, 0, count); ! ! for (n = 0; n < count; ++n) ! { ! lua_pushstring(L, wx2lua(strArr[n].BeforeLast(wxT(' ')))); ! strArr[n].AfterLast(wxT(' ')).ToLong(&val); ! lua_pushnumber(L, (double)val); ! lua_rawset(L, -3); ! } ! return 1; } --- 47,51 ---- { wxLuaState wxlState(L); ! wxlua_pushwxArrayStringtable(L, wxlState.GetTrackedObjectStrings()); return 1; } *************** *** 81,97 **** { wxLuaState wxlState(L); ! wxArrayString strArr = wxlState.GetTrackedCallbackStrings(); ! size_t n, count = strArr.GetCount(); ! long val = 0; ! lua_createtable(L, 0, count); ! ! for (n = 0; n < count; ++n) ! { ! lua_pushstring(L, wx2lua(strArr[n].BeforeFirst(wxT(' ')))); ! strArr[n].AfterLast(wxT(' ')).ToLong(&val); ! lua_pushnumber(L, (double)val); ! lua_rawset(L, -3); ! } ! return 1; } --- 57,61 ---- { wxLuaState wxlState(L); ! wxlua_pushwxArrayStringtable(L, wxlState.GetTrackedCallbackStrings()); return 1; } *************** *** 103,119 **** { wxLuaState wxlState(L); ! wxArrayString strArr = wxlState.GetTrackedWinDestroyCallbackStrings(); ! size_t n, count = strArr.GetCount(); ! long val = 0; ! lua_createtable(L, 0, count); ! ! for (n = 0; n < count; ++n) ! { ! lua_pushstring(L, wx2lua(strArr[n].BeforeLast(wxT(' ')))); ! strArr[n].AfterLast(wxT(' ')).ToLong(&val); ! lua_pushnumber(L, (double)val); ! lua_rawset(L, -3); ! } ! return 1; } --- 67,71 ---- { wxLuaState wxlState(L); ! wxlua_pushwxArrayStringtable(L, wxlState.GetTrackedWinDestroyCallbackStrings()); return 1; } |