From: John L. <jr...@us...> - 2007-12-08 00:25:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14401/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: Move the wxLuaState s_wxHashMapLuaState to the wxLuaState since that's what it gets Cleanup the wxlua_CallOverloadedFunction a little Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** wxlstate.h 7 Dec 2007 06:44:46 -0000 1.102 --- wxlstate.h 8 Dec 2007 00:25:22 -0000 1.103 *************** *** 213,216 **** --- 213,218 ---- // Get the tag for the class with the given name WXDLLIMPEXP_WXLUA int LUACALL wxluaT_gettag(lua_State* L, const char* name); + // Is the item at stack_idx of the userdata type with or derived from the the given tag. + WXDLLIMPEXP_WXLUA bool wxluaT_isuserdatatype(lua_State* L, int stack_idx, int tag); // Get the userdata object at the stack_idx that is of the class type tag or a *************** *** 301,306 **** // (wxString, wxArrayString, wxArrayInt) to and from Lua types to wxluatypes, WXDLLIMPEXP_WXLUA int LUACALL wxlua_iswxluatype(int luatype, int wxluaarg_tag, lua_State* L = NULL); - // Is the item at stack_idx of the userdata type with or derived from the the given tag. - WXDLLIMPEXP_WXLUA bool wxlua_isuserdatatype(lua_State* L, int stack_idx, int tag); // Get a human readable name for the predefined WXLUAARG_XXX or s_wxluaarg_XXX tags. // returns empty string if the tag was not one of the predefined types. --- 303,306 ---- *************** *** 499,503 **** // if 'force' = true then make sure all wxWindows are destroyed. bool CloseLuaState(bool force); ! // clear all wxLuaCallbacks on destruction void ClearCallbacks(); --- 499,503 ---- // if 'force' = true then make sure all wxWindows are destroyed. bool CloseLuaState(bool force); ! // clear all wxLuaCallbacks and wxLuaWinDestroyCallbacks on destruction void ClearCallbacks(); *************** *** 510,524 **** wxLuaStateData* m_wxlStateData; // the data shared for this state bool m_own_stateData; // not a coroutine when true, so delete it when done - - // Get the wxLuaState from the corresponding lua_State - // returns wxNullLuaState if none found. - static wxLuaState GetLuaState(lua_State* L); - // A mapping between hashmap[lua_State* L] = *wxLuaState - // Note: The hashed new wxLuaState is not Refed since we want to know when - // the ref count goes to 1 for cleanup and it is deleted when - // it's wxLuaStateRefData is finally deleted. - // Note: The coroutine lua_States are not hashed since we cannot know when - // they are deleted. We create wxLuaStates for them on the fly. - static wxHashMapLuaState s_wxHashMapLuaState; }; --- 510,513 ---- *************** *** 561,564 **** --- 550,555 ---- virtual ~wxLuaState() { Destroy(); } + // ----------------------------------------------------------------------- + // Ref the given wxLuaState void Create(const wxLuaState& wxlState); *************** *** 608,611 **** --- 599,615 ---- // ----------------------------------------------------------------------- + // Get the wxLuaState from the corresponding lua_State + // returns wxNullLuaState if none found. + static wxLuaState GetwxLuaState(lua_State* L); + // A mapping between hashmap[lua_State* L] = wxLuaState* + // Note: The hashed new wxLuaState is not Refed since we want to know when + // the ref count goes to 1 for cleanup and it is deleted when + // it's wxLuaStateRefData is finally deleted. + // Note: The coroutine lua_States are not hashed since we cannot know when + // they are created or deleted. We must create wxLuaStates for them on the fly. + static wxHashMapLuaState s_wxHashMapLuaState; + + // ----------------------------------------------------------------------- + // Set the event handler that the wxLuaEvents from this will be sent to, can be NULL. // See wxEVT_LUA_XXX for a list of possible events that may be sent. *************** *** 1140,1148 **** void GetGlobals(); - // Return a human readable string of the args for the functions in the method - wxArrayString CreateMethodArgTagsMsg(struct wxLuaBindMethod* method); - // overloaded function call helper - int LUACALL CallOverloadedFunction(struct wxLuaBindMethod* method); - // ----------------------------------------------------------------------- // LUA_PATH --- 1144,1147 ---- |