Update of /cvsroot/wxlua/wxLua/modules/wxlua/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18786/wxLua/modules/wxlua/src
Modified Files:
wxlbind.cpp wxlcallb.cpp wxlstate.cpp
Log Message:
lots of little cleanups
Add wx.NULL to replace wx.wxNull (which still exists) to be more C like
Don't have static WXLUAMETHODs and then en extern pointer to them, just don't have them static
More variable/function name changes to make the code more readable
Index: wxlstate.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** wxlstate.cpp 12 Dec 2006 01:23:40 -0000 1.83
--- wxlstate.cpp 12 Dec 2006 07:09:41 -0000 1.84
***************
*** 48,60 ****
extern int wxLuaClassListCompareByTag(const void *p1, const void *p2); // wxlbind.cpp
- // lua registry table
- const char wxLuaReferences[] = "wxLuaReferences";
- const char wxLuaNull[] = "wxNull";
-
wxLuaState wxNullLuaState(false);
- #include "wx/arrimpl.cpp"
- WX_DEFINE_OBJARRAY(wxArrayLuaState);
[...1112 lines suppressed...]
- if (token == path ||
- !wxFileName::IsCaseSensitive() && token.CmpNoCase(path) == 0)
- return;
- }
-
- // append separator
- if (!luapath.IsEmpty() && luapath.Last() != wxT(';'))
- luapath += wxT(';');
-
- // append path
- luapath += path;
- luapath += wxT(';');
-
- lua_PushString(wx2lua(luapath));
- lua_SetGlobal(LUA_PATH);
- }
-
//-----------------------------------------------------------------------------
// wxLuaEvent
--- 3524,3527 ----
Index: wxlbind.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** wxlbind.cpp 12 Dec 2006 01:23:40 -0000 1.45
--- wxlbind.cpp 12 Dec 2006 07:09:41 -0000 1.46
***************
*** 498,502 ****
m_objectCount(0), m_objectList(NULL),
m_functionCount(0), m_functionList(NULL),
! m_typesRegistered(false),
m_startTag(0),
m_lastTag(0),
--- 498,502 ----
m_objectCount(0), m_objectList(NULL),
m_functionCount(0), m_functionList(NULL),
! m_bindings_registered(false),
m_startTag(0),
m_lastTag(0),
***************
*** 539,543 ****
wxLuaState wxlState(wxlState_);
! if (!registerTypes && !m_typesRegistered)
wxlState.terror("wxLua: First time registration must register types");
--- 539,543 ----
wxLuaState wxlState(wxlState_);
! if (!registerTypes && !m_bindings_registered)
wxlState.terror("wxLua: First time registration must register types");
***************
*** 593,597 ****
PostRegister(wxlState, registerTypes, tableOffset);
! m_typesRegistered = true;
return tableOffset;
--- 593,597 ----
PostRegister(wxlState, registerTypes, tableOffset);
! m_bindings_registered = true;
return tableOffset;
Index: wxlcallb.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** wxlcallb.cpp 12 Dec 2006 01:23:40 -0000 1.21
--- wxlcallb.cpp 12 Dec 2006 07:09:41 -0000 1.22
***************
*** 78,82 ****
// Disconnect all callbacks associated with this window's evthandler
! theCallback->ClearLuaState();
wxEvtHandler *evtHandler = ((wxWindow*)event.GetEventObject())->GetEventHandler();
--- 78,82 ----
// Disconnect all callbacks associated with this window's evthandler
! theCallback->ClearwxLuaState();
wxEvtHandler *evtHandler = ((wxWindow*)event.GetEventObject())->GetEventHandler();
***************
*** 94,98 ****
wxlState.GetTrackedEventHandlerList()->Erase(pc_node);
! pCallback->ClearLuaState();
}
else
--- 94,98 ----
wxlState.GetTrackedEventHandlerList()->Erase(pc_node);
! pCallback->ClearwxLuaState();
}
else
|