mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Log deprecated Lua function calls (#7491)
This commit is contained in:
parent
6f22d14206
commit
49509d2f74
6 changed files with 96 additions and 7 deletions
|
@ -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 <unordered_map>
|
||||
|
||||
extern "C" {
|
||||
#include <lua.h>
|
||||
|
@ -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:
|
||||
// <old_name> = { <new_name>, <new_function> }
|
||||
static std::unordered_map<std::string, luaL_Reg> m_deprecated_wrappers;
|
||||
static bool m_error_deprecated_calls;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue