mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-16 18:03:42 +02:00
CLuaInstance: Add script function 'paramDeprecated'
This commit is contained in:
@@ -418,6 +418,18 @@ void CLuaInstance::functionDeprecated(lua_State *L, const char* oldFunc, const c
|
||||
ar.short_src, ar.currentline);
|
||||
}
|
||||
|
||||
void CLuaInstance::paramDeprecated(lua_State *L, const char* oldParam, const char* newParam)
|
||||
{
|
||||
lua_Debug ar;
|
||||
lua_getstack(L, 1, &ar);
|
||||
lua_getinfo(L, "Sl", &ar);
|
||||
printf("[Lua Script] \33[1;31m%s\33[0m %s \33[33m%s\33[0m %s \33[1;33m%s\33[0m.\n (%s:%d)\n",
|
||||
g_Locale->getText(LOCALE_LUA_FUNCTION_DEPRECATED1),
|
||||
g_Locale->getText(LOCALE_LUA_PARAMETER_DEPRECATED2), oldParam,
|
||||
g_Locale->getText(LOCALE_LUA_FUNCTION_DEPRECATED3), newParam,
|
||||
ar.short_src, ar.currentline);
|
||||
}
|
||||
|
||||
lua_Unsigned CLuaInstance::checkMagicMask(lua_Unsigned &col)
|
||||
{
|
||||
if ((col & MAGIC_MASK) == MAGIC_COLOR)
|
||||
|
@@ -212,6 +212,7 @@ private:
|
||||
static bool _luaL_checkbool(lua_State *L, int numArg);
|
||||
static void paramBoolDeprecated(lua_State *L, const char* val);
|
||||
static void functionDeprecated(lua_State *L, const char* oldFunc, const char* newFunc);
|
||||
static void paramDeprecated(lua_State *L, const char* oldParam, const char* newParam);
|
||||
static lua_Unsigned checkMagicMask(lua_Unsigned &col);
|
||||
|
||||
static int NewWindow(lua_State *L);
|
||||
|
Reference in New Issue
Block a user