Update of /cvsroot/wxlua/wxLua/modules/wxbind/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21421/wxLua/modules/wxbind/src
Modified Files:
wxbase_bind.cpp wxcore_bind.cpp
Log Message:
Removed the rest of "UnregisterBinding" functions since they did nothing useful
Moved binding base class linking code to wxLuaBinding::InitAllBindings from
wxLuaState::RegisterBindings
Removed wxLuaStateData::m_winDestroyCallbackList and
wxLuaStateData::m_callbackList and added two registry tables for their
values. Should be faster and easier to verify operation.
Fix searching in the wxLuaStackDialog.
Index: wxcore_bind.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** wxcore_bind.cpp 17 Nov 2007 00:14:58 -0000 1.5
--- wxcore_bind.cpp 5 Dec 2007 00:34:46 -0000 1.6
***************
*** 3849,3853 ****
// wxKillError rc = NULL
wxKillError rc = wxKILL_OK;
! //wxKillError * rc = (argCount >= 3 ? (wxKillError *)wxlState.wxluaT_ToUserdata(3) : NULL);
// wxSignal sig = wxSIGTERM
wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getintegertype(L, 2) : wxSIGTERM);
--- 3849,3853 ----
// wxKillError rc = NULL
wxKillError rc = wxKILL_OK;
! //wxKillError * rc = (argCount >= 3 ? (wxKillError *)wxlua_touserdata(L, 3) : NULL);
// wxSignal sig = wxSIGTERM
wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getintegertype(L, 2) : wxSIGTERM);
Index: wxbase_bind.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxbase_bind.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** wxbase_bind.cpp 17 Nov 2007 00:14:57 -0000 1.3
--- wxbase_bind.cpp 5 Dec 2007 00:34:46 -0000 1.4
***************
*** 2492,2504 ****
void wxLuaBinding_wxbase::PostRegister(const wxLuaState& wxlState, int luaTable)
{
! wxLuaState wxLS(wxlState);
! wxCHECK_RET(wxLS.Ok(), wxT("Invalid wxLuaState"));
! lua_State* L = wxLS.GetLuaState();
! g_wxluatag_NULL = wxLS.wxluaT_NewTag();
lua_pushlstring(L, "NULL", 4);
! wxLS.wxluaT_PushUserTag(NULL, g_wxluatag_NULL, true);
! lua_rawset(L, luaTable);
}
--- 2492,2504 ----
void wxLuaBinding_wxbase::PostRegister(const wxLuaState& wxlState, int luaTable)
{
! wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState"));
! lua_State* L = wxlState.GetLuaState();
! g_wxluatag_NULL = wxluaT_newtag(L);
! lua_pop(L, 1); // pop the table
lua_pushlstring(L, "NULL", 4);
! wxluaT_pushusertag(L, NULL, g_wxluatag_NULL, true);
! lua_rawset(L, luaTable); // set t["NULL"] = userdata(NULL) w/ NULL tag
}
|