mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Script: Fixed backwards compatibility issues due to removed tolua.cast
This commit is contained in:
parent
73ccbd21db
commit
6079c7d0d9
@ -57,7 +57,23 @@ static int Print(lua_State* L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int tolua_cast(lua_State* L)
|
||||||
|
{
|
||||||
|
// Simply push first argument onto stack.
|
||||||
|
lua_pushvalue(L, 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
void LuaManager::RegisterGlobal(lua_State* L)
|
void LuaManager::RegisterGlobal(lua_State* L)
|
||||||
{
|
{
|
||||||
lua_register(L, "print", Print);
|
lua_register(L, "print", Print);
|
||||||
|
|
||||||
|
// Register tolua.cast() for backwards compatibility.
|
||||||
|
const luaL_Reg toluaFuncs[] =
|
||||||
|
{
|
||||||
|
{ "cast", tolua_cast },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
luaL_register(L, "tolua", toluaFuncs);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user