mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-27 22:29:16 +00:00
parent
90eaad6cc2
commit
1a3a302708
@ -130,20 +130,22 @@ struct Moon::Main
|
|||||||
|
|
||||||
Main(Libc::Env &env) : _env(env)
|
Main(Libc::Env &env) : _env(env)
|
||||||
{
|
{
|
||||||
Moon::env = &_moon_env;
|
Libc::with_libc([&] () {
|
||||||
|
Moon::env = &_moon_env;
|
||||||
|
|
||||||
lua_State *lua = lua_open();
|
lua_State *lua = lua_open();
|
||||||
|
|
||||||
/* initialize libs */
|
/* initialize libs */
|
||||||
luaopen_base(lua);
|
luaopen_base(lua);
|
||||||
|
|
||||||
/* register Genode Lua library */
|
/* register Genode Lua library */
|
||||||
luaL_register(lua, "Genode", l_genode);
|
luaL_register(lua, "Genode", l_genode);
|
||||||
|
|
||||||
if (luaL_dostring(lua, exec_string) != 0)
|
if (luaL_dostring(lua, exec_string) != 0)
|
||||||
Genode::log(lua_tostring(lua, -1));
|
Genode::log(lua_tostring(lua, -1));
|
||||||
|
|
||||||
lua_close(lua);
|
lua_close(lua);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user