From 49509d2f746b7a8d50e685cfd0e0b391676b9466 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 1 Jul 2018 12:31:49 +0200 Subject: Log deprecated Lua function calls (#7491) --- src/script/lua_api/l_base.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/script/lua_api/l_base.h') diff --git a/src/script/lua_api/l_base.h b/src/script/lua_api/l_base.h index 12c1a86cc..b46b5b567 100644 --- a/src/script/lua_api/l_base.h +++ b/src/script/lua_api/l_base.h @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common/c_internal.h" #include "common/helper.h" #include "gamedef.h" +#include extern "C" { #include @@ -70,4 +71,11 @@ public: const char* name, lua_CFunction func, int top); + + static int l_deprecated_function(lua_State *L); + static void markAliasDeprecated(luaL_Reg *reg); +private: + // = { , } + static std::unordered_map m_deprecated_wrappers; + static bool m_error_deprecated_calls; }; -- cgit v1.2.3