mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
CLuaInstance: Add member paramBoolDeprecated() for info...
...when Boolean parameters are passed as a string or number
Origin commit data
------------------
Branch: ni/coolstream
Commit: 86186e6443
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-09-11 (Thu, 11 Sep 2014)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -368,6 +368,18 @@ bool CLuaInstance::_luaL_checkbool(lua_State *L, int numArg)
|
||||
return b;
|
||||
}
|
||||
|
||||
void CLuaInstance::paramBoolDeprecated(lua_State *L, const char* val)
|
||||
{
|
||||
lua_Debug ar;
|
||||
lua_getstack(L, 1, &ar);
|
||||
lua_getinfo(L, "Sl", &ar);
|
||||
printf("[Lua Script] \33[1;31m%s\33[0m %s (\33[31m\"%s\"\33[0m)\n %s \33[32mtrue\33[0m.\n (%s:%d)\n",
|
||||
g_Locale->getText(LOCALE_LUA_BOOLPARAM_DEPRECATED1),
|
||||
g_Locale->getText(LOCALE_LUA_BOOLPARAM_DEPRECATED2), val,
|
||||
g_Locale->getText(LOCALE_LUA_BOOLPARAM_DEPRECATED3),
|
||||
ar.short_src, ar.currentline);
|
||||
}
|
||||
|
||||
void CLuaInstance::functionDeprecated(lua_State *L, const char* oldFunc, const char* newFunc)
|
||||
{
|
||||
lua_Debug ar;
|
||||
|
Reference in New Issue
Block a user