From: John L. <jr...@us...> - 2008-01-24 00:18:24
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5955/wxLua/modules/wxluasocket/src Modified Files: wxluasocket_bind.cpp Log Message: * The wxLua type numbers are now generated when the first wxLuaState is created rather then when the bindings are registered into Lua. This means that each wxLua type stays the same for the life of the program no matter what bindings are installed or in what order. - The copy of the wxLuaBindingList in the wxLuaState was removed since it is no longer needed. Renamed the functions static wxLuaBinding::GetBindXXX() to FindBindXXX() since they no longer needed the extra wxLuaBindingList parameter and they had the same signature as the existing GetBindXXX() functions. - Added wxLuaState::RegisterBinding(wxLuaBinding*) function to register single bindings at a time. You may also reregister bindings, which means that their metatable functions are simple rewritten. Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wxluasocket_bind.cpp 23 Jan 2008 06:43:40 -0000 1.26 --- wxluasocket_bind.cpp 24 Jan 2008 00:18:19 -0000 1.27 *************** *** 161,165 **** m_objectArray = wxLuaGetObjectList_wxluasocket(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxluasocket(m_functionCount); - InitBinding(); } --- 161,164 ---- *************** *** 173,193 **** // --------------------------------------------------------------------------- - bool wxLuaBinding_wxluasocket_bind(const wxLuaState& wxlState_) - { - wxLuaState wxlState(wxlState_); - wxCHECK_MSG(wxlState.Ok(), false, wxT("Invalid wxLuaState")); - - wxASSERT(!wxlState.GetLuaStateData()->m_bindings_registered); - wxASSERT(!wxlState.GetLuaBinding(wxT("wxluasocket"))); - - // ignore binding request when we already have wxluasocket registered - if (wxlState.GetLuaBinding(wxT("wxluasocket"))) - return false; - - wxlState.GetLuaStateData()->m_bindingList.Append(new wxLuaBinding_wxluasocket()); - - return true; - } - bool wxLuaBinding_wxluasocket_init() { --- 172,175 ---- |