コード例 #1
0
 public void OpenLibraries(LuaState state)
 {
     LuaBindings.luaL_requiref(state, "package", luaopen_package, 1);
     LuaBindingMacros.lua_pop(state, 1);
     LuaBindings.luaL_requiref(state, "io", luaopen_io, 1);
     LuaBindingMacros.lua_pop(state, 1);
     LuaBindings.luaL_requiref(state, "os", luaopen_os, 1);
     LuaBindingMacros.lua_pop(state, 1);
 }
コード例 #2
0
 public static void OpenLibraries(LuaState state)
 {
     if (state == IntPtr.Zero)
     {
         throw new Exception("Lua state is null");
     }
     LuaBindings.luaL_requiref(state, "package", luaopen_package, 1);
     LuaBindingMacros.lua_pop(state, 1);
     LuaBindings.luaL_requiref(state, "io", luaopen_io, 1);
     LuaBindingMacros.lua_pop(state, 1);
     LuaBindings.luaL_requiref(state, "os", luaopen_os, 1);
     LuaBindingMacros.lua_pop(state, 1);
 }