Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13186/wxLua/modules/wxluasocket/src
Modified Files:
wxldtarg.cpp wxluasocket_bind.cpp
Log Message:
Streamlined wxLuaBinding::RegisterBinding(...) and remove the bool
"registerClasses" since it didn't do anything useful anyway.
If there needs to be a way to reregister the wxLua functions it should
to be implemented from the ground up.
Renamed the functions wxlua_txxx to wxluaT_xxx to make it easier to
search for their usage. The functions in the wxLuaState used to be
called just "txxx" and are now called wxluaT_Xxx where the first
letter or each word is capitalized (camel-case); again for searching.
* This is the beginning of the separation between the "wxLuaReferences"
being used for both the "tags" for identifying classes and for just
having references to objects so Lua won't GC them.
Index: wxldtarg.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** wxldtarg.cpp 26 Jul 2007 18:56:40 -0000 1.39
--- wxldtarg.cpp 17 Nov 2007 00:15:11 -0000 1.40
***************
*** 322,326 ****
{
int iItem = m_references.Item(idx);
! m_wxlState.tremove(iItem);
}
m_references.Clear();
--- 322,326 ----
{
int iItem = m_references.Item(idx);
! m_wxlState.wxluaT_Remove(iItem);
}
m_references.Clear();
***************
*** 503,507 ****
lua_pushliteral(L, "OK");
! nReference = m_wxlState.tinsert(-1);
lua_settop(L, nOldTop);
}
--- 503,507 ----
lua_pushliteral(L, "OK");
! nReference = m_wxlState.wxluaT_Insert(-1);
lua_settop(L, nOldTop);
}
***************
*** 520,524 ****
if (strExpr == name)
{
! nReference = m_wxlState.tinsert(-1);
fFound = true;
break;
--- 520,524 ----
if (strExpr == name)
{
! nReference = m_wxlState.wxluaT_Insert(-1);
fFound = true;
break;
***************
*** 546,550 ****
if (strExpr == name)
{
! nReference = m_wxlState.tinsert(-1); // reference value and pop it.
lua_pop(L, 1); // pop index
fFound = true;
--- 546,550 ----
if (strExpr == name)
{
! nReference = m_wxlState.wxluaT_Insert(-1); // reference value and pop it.
lua_pop(L, 1); // pop index
fFound = true;
***************
*** 561,567 ****
}
! if (m_wxlState.tget(nReference))
{
! m_wxlState.tremove(nReference);
switch (lua_type(L, -1))
{
--- 561,567 ----
}
! if (m_wxlState.wxluaT_Get(nReference))
{
! m_wxlState.wxluaT_Remove(nReference);
switch (lua_type(L, -1))
{
Index: wxluasocket_bind.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** wxluasocket_bind.cpp 16 Jul 2007 19:35:31 -0000 1.22
--- wxluasocket_bind.cpp 17 Nov 2007 00:15:12 -0000 1.23
***************
*** 174,181 ****
}
! void wxLuaBinding_wxluasocket::PreRegister(const wxLuaState& , bool , int )
{
}
! void wxLuaBinding_wxluasocket::PostRegister(const wxLuaState& , bool , int )
{
}
--- 174,181 ----
}
! void wxLuaBinding_wxluasocket::PreRegister(const wxLuaState& , int )
{
}
! void wxLuaBinding_wxluasocket::PostRegister(const wxLuaState&, int )
{
}
|