mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Lua: Object tables were left on stack, fixed.
This commit is contained in:
parent
e2a736ed83
commit
13e5af0f17
@ -28,7 +28,7 @@ void LuaManager::Initialize()
|
|||||||
if (c_State == NULL)
|
if (c_State == NULL)
|
||||||
{
|
{
|
||||||
// Initialize Lua
|
// Initialize Lua
|
||||||
c_State = lua_open();
|
c_State = luaL_newstate();
|
||||||
|
|
||||||
// Initialize standard libraries except debug, modified from linit.c
|
// Initialize standard libraries except debug, modified from linit.c
|
||||||
const luaL_Reg lualibs[] =
|
const luaL_Reg lualibs[] =
|
||||||
@ -53,7 +53,6 @@ void LuaManager::Initialize()
|
|||||||
// Register custom types and functions
|
// Register custom types and functions
|
||||||
RegisterGlobal(c_State);
|
RegisterGlobal(c_State);
|
||||||
RegisterMeasure(c_State);
|
RegisterMeasure(c_State);
|
||||||
RegisterMeasure(c_State);
|
|
||||||
RegisterMeter(c_State);
|
RegisterMeter(c_State);
|
||||||
RegisterMeterWindow(c_State);
|
RegisterMeterWindow(c_State);
|
||||||
}
|
}
|
||||||
|
@ -167,4 +167,5 @@ void LuaManager::RegisterMeasure(lua_State* L)
|
|||||||
luaL_register(L, "CMeasure", functions);
|
luaL_register(L, "CMeasure", functions);
|
||||||
lua_pushvalue(L, -1);
|
lua_pushvalue(L, -1);
|
||||||
lua_setfield(L, -2, "__index");
|
lua_setfield(L, -2, "__index");
|
||||||
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
@ -169,4 +169,5 @@ void LuaManager::RegisterMeter(lua_State* L)
|
|||||||
luaL_register(L, "CMeter", functions);
|
luaL_register(L, "CMeter", functions);
|
||||||
lua_pushvalue(L, -1);
|
lua_pushvalue(L, -1);
|
||||||
lua_setfield(L, -2, "__index");
|
lua_setfield(L, -2, "__index");
|
||||||
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
@ -200,4 +200,5 @@ void LuaManager::RegisterMeterWindow(lua_State* L)
|
|||||||
luaL_register(L, "CMeterWindow", functions);
|
luaL_register(L, "CMeterWindow", functions);
|
||||||
lua_pushvalue(L, -1);
|
lua_pushvalue(L, -1);
|
||||||
lua_setfield(L, -2, "__index");
|
lua_setfield(L, -2, "__index");
|
||||||
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user