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:
Michael Liebmann
2014-09-11 18:15:34 +02:00
parent e657991bef
commit b7518f435f
6 changed files with 26 additions and 1 deletions

View File

@@ -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;