From: John L. <jr...@us...> - 2007-07-26 19:36:04
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16448/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlcallb.cpp wxlstate.cpp Log Message: Update authors to include John Labenski and Ray Gilbert Remove code attribution to LuaPlus since we don't use anything from it Code cleanup Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.123 retrieving revision 1.124 diff -C2 -d -r1.123 -r1.124 *** wxlstate.cpp 22 Jul 2007 04:38:29 -0000 1.123 --- wxlstate.cpp 26 Jul 2007 18:56:39 -0000 1.124 *************** *** 7,27 **** ///////////////////////////////////////////////////////////////////////////// - /* **************************************************************************** - - Portions of code in this file have been taken from LuaPlus. - LuaPlus was written and maintained by Joshua Jensen (jj...@wo...) - and resides as http://wwhiz.com/LuaPlus/index.html . LuaPlus is distributed - with the Lua Licence as described below. - - Lua License - ----------- - Lua is licensed under the terms of the MIT license reproduced below. - This mean that Lua is free software and can be used for both academic and - commercial purposes at absolutely no cost. - - For details, see http://www.lua.org/license.html . - - **************************************************************************** */ - // For compilers that support precompilation, includes "wx/wx.h" #include "wx/wxprec.h" --- 7,10 ---- *************** *** 108,111 **** --- 91,96 ---- wxlState.SendEvent(event); } + else if (!msg.IsEmpty()) + wxPrintf(wxT("%s\n"), msg.c_str()); return 0; // no items put onto stack Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** wxlbind.cpp 26 Jul 2007 02:51:37 -0000 1.87 --- wxlbind.cpp 26 Jul 2007 18:56:39 -0000 1.88 *************** *** 542,548 **** m_functionCount(0), m_functionArray(NULL), m_bindings_registered(false), ! m_startTag(0), ! m_lastTag(0), ! m_wxLuaTable(-1) { } --- 542,548 ---- m_functionCount(0), m_functionArray(NULL), m_bindings_registered(false), ! m_start_tag(0), ! m_last_tag(0), ! m_luaTable_tag(-1) { } *************** *** 638,642 **** // create a tag for the wxLua table if (registerTypes) ! m_wxLuaTable = wxlState.tnewtag(); // create the wxLua table --- 638,642 ---- // create a tag for the wxLua table if (registerTypes) ! m_luaTable_tag = wxlState.tnewtag(); // create the wxLua table *************** *** 645,652 **** // set the table tag ! wxlState.tsettag(m_wxLuaTable); // prevent changes from lua scripts ! //wxlState.tsettagmethod(m_wxLuaTable, "__newindex", wxlua_tableErrorHandler); // FIXME allow this? } else --- 645,652 ---- // set the table tag ! wxlState.tsettag(m_luaTable_tag); // prevent changes from lua scripts ! //wxlState.tsettagmethod(m_luaTable_tag, "__newindex", wxlua_tableErrorHandler); // FIXME allow this? } else *************** *** 658,662 **** wxLuaBinding* namedBinding = NULL; ! // find the m_wxLuaTable of the previously loaded binding (start at last) wxLuaBindingList::compatibility_iterator node = wxlState.GetLuaBindingList()->GetFirst(); for (; node; node = node->GetNext()) --- 658,662 ---- wxLuaBinding* namedBinding = NULL; ! // find the m_luaTable_tag of the previously loaded binding (start at last) wxLuaBindingList::compatibility_iterator node = wxlState.GetLuaBindingList()->GetFirst(); for (; node; node = node->GetNext()) *************** *** 664,673 **** wxLuaBinding* binding = node->GetData(); ! if ((binding->GetLuaNamespace() == m_nameSpace) && (binding->m_wxLuaTable >= 0)) namedBinding = binding; } if (namedBinding) ! m_wxLuaTable = namedBinding->m_wxLuaTable; } --- 664,673 ---- wxLuaBinding* binding = node->GetData(); ! if ((binding->GetLuaNamespace() == m_nameSpace) && (binding->m_luaTable_tag >= 0)) namedBinding = binding; } if (namedBinding) ! m_luaTable_tag = namedBinding->m_luaTable_tag; } *************** *** 699,705 **** if (registerTypes) ! m_startTag = wxlState.tnewtag(); ! int iTag = m_startTag; // install the classes, functions and methods, creating new tags --- 699,705 ---- if (registerTypes) ! m_start_tag = wxlState.tnewtag(); ! int iTag = m_start_tag; // install the classes, functions and methods, creating new tags *************** *** 871,875 **** } ! m_lastTag = iTag; // register all the builtin functions, global C style functions --- 871,875 ---- } ! m_last_tag = iTag; // register all the builtin functions, global C style functions *************** *** 929,936 **** return false; ! for (size_t n = 0; n < m_classCount; ++n) { - wxLuaBindClass* baseClass = m_classArray + n; // potential base class - if (strcmp(baseClass->name, wxlClass->baseclassName) == 0) { --- 929,935 ---- return false; ! wxLuaBindClass* baseClass = m_classArray; // potential base class ! for (size_t n = 0; n < m_classCount; ++n, ++baseClass) { if (strcmp(baseClass->name, wxlClass->baseclassName) == 0) { *************** *** 967,972 **** { int class_tag = class_tag_; ! wxLuaBindClass classItem = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ! classItem.class_tag = &class_tag; // this relies on LUA allocating tags in ascending order of definition --- 966,971 ---- { int class_tag = class_tag_; ! wxLuaBindClass classItem = { 0, 0, 0, 0, &class_tag, 0, 0, 0, 0 }; ! //classItem.class_tag = &class_tag; // this relies on LUA allocating tags in ascending order of definition *************** *** 1064,1099 **** && (strcmp(wxlMethod->name, methodName) == 0)) { - /* // NOTE: This is now implemented in wxLuaState::RegisterBindings - - - // iterate through the base classes to find if this function is - // an overload, but only if we haven't checked already. - if (!WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_OVERLOAD_BASE|WXLUAMETHOD_DELETE)) - { - wxLuaBindClass *baseClass = wxlClass->baseclass; - wxLuaBindMethod *parentMethod = wxlMethod; - - while (baseClass) - { - parentMethod->type |= WXLUAMETHOD_OVERLOAD_BASE; // have checked this - - wxLuaBindMethod* baseMethod = GetClassMethod(baseClass, methodName, false); - if (baseMethod) - { - if (!WXLUA_HASBIT(baseMethod->type, WXLUAMETHOD_DELETE)) - { - parentMethod->basemethod = baseMethod; - parentMethod = baseMethod; - } - - // we have already checked the base classes below this - if (WXLUA_HASBIT(baseMethod->type, WXLUAMETHOD_OVERLOAD_BASE)) - break; - } - - baseClass = baseClass->baseclass; - } - } - */ return wxlMethod; } --- 1063,1066 ---- Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wxlcallb.cpp 26 Jul 2007 02:51:37 -0000 1.34 --- wxlcallb.cpp 26 Jul 2007 18:56:39 -0000 1.35 *************** *** 2,6 **** // Name: wxlcallb.cpp // Purpose: wxLuaCallback and wxLuaWinDestroyCallback ! // Author: Francis Irving // Created: 11/05/2002 // Copyright: (c) 2002 Creature Labs. All rights reserved. --- 2,6 ---- // Name: wxlcallb.cpp // Purpose: wxLuaCallback and wxLuaWinDestroyCallback ! // Author: Francis Irving, John Labenski // Created: 11/05/2002 // Copyright: (c) 2002 Creature Labs. All rights reserved. |