public LuaFunction(LuaState luaState, int index) : base(luaState) { LuaLib.lua_pushvalue(luaState.L, index); // |...|f|...|f _RefId = LuaLib.luaL_ref(luaState.L, LuaIndices.LUA_REGISTRYINDEX); // |...|f|...| // Registry[reference] = f }
public static void lua_pop(IntPtr luaState, int n) { LuaLib.lua_settop(luaState, -(n) - 1); }