From 4c3359d9136513eac152f2d2403587c503e68529 Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Thu, 13 Feb 2025 22:14:21 +0000 Subject: [PATCH] Revert "solve compile failed in larger 3.0.0, lua-5.1 (closes #122)." This reverts commit bde906e39b19f5179c66c44c9b681f40bf4475e0. --- wxLua/modules/wxlua/wxlstate.cpp | 14 ++++++++++++++ wxLua/modules/wxlua/wxlstate.h | 12 ------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/wxLua/modules/wxlua/wxlstate.cpp b/wxLua/modules/wxlua/wxlstate.cpp index 8518a9e9..18005b6b 100644 --- a/wxLua/modules/wxlua/wxlstate.cpp +++ b/wxLua/modules/wxlua/wxlstate.cpp @@ -2356,6 +2356,20 @@ void wxLuaState::AddLuaPath(const wxFileName& filename) // wxLuaEvent //----------------------------------------------------------------------------- +#if wxCHECK_VERSION(3,0,0) +wxDEFINE_EVENT(wxEVT_LUA_CREATION, wxLuaEvent); +wxDEFINE_EVENT(wxEVT_LUA_PRINT, wxLuaEvent); +wxDEFINE_EVENT(wxEVT_LUA_ERROR, wxLuaEvent); +wxDEFINE_EVENT(wxEVT_LUA_DEBUG_HOOK, wxLuaEvent); +#else +DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_CREATION) +DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_PRINT) +DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_ERROR) +DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_DEBUG_HOOK) +//DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_INIT) +//DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_DEBUGGERATTACHED) +#endif + wxLuaEvent::wxLuaEvent(wxEventType commandType, wxWindowID id, const wxLuaState& wxlState) :wxNotifyEvent(commandType, id), m_wxlState(wxlState), m_debug_hook_break(false), diff --git a/wxLua/modules/wxlua/wxlstate.h b/wxLua/modules/wxlua/wxlstate.h index eff8a514..64b59bb2 100644 --- a/wxLua/modules/wxlua/wxlstate.h +++ b/wxLua/modules/wxlua/wxlstate.h @@ -792,18 +792,6 @@ class WXDLLIMPEXP_WXLUA wxLuaEvent: public wxNotifyEvent lua_Debug *m_lua_Debug; }; -#if wxCHECK_VERSION(3,0,0) -wxDEFINE_EVENT(wxEVT_LUA_CREATION, wxLuaEvent); -wxDEFINE_EVENT(wxEVT_LUA_PRINT, wxLuaEvent); -wxDEFINE_EVENT(wxEVT_LUA_ERROR, wxLuaEvent); -wxDEFINE_EVENT(wxEVT_LUA_DEBUG_HOOK, wxLuaEvent); -#else -DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_CREATION) -DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_PRINT) -DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_ERROR) -DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_DEBUG_HOOK) -#endif - #if wxCHECK_VERSION(3,0,0) // A wxLuaState is being created, sent at the end of // wxLuaState(wxEvtHandler, win id) or Create(wxEvtHandler, win id)