コード例 #1
0
        /// <summary>
        /// Register a loader in package.loaders. </summary>
        private static void p(Lua L, LuaTable t, int which)
        {
            PackageLib f       = new PackageLib(which, t);
            object     loaders = L.getField(t, "loaders");

            L.rawSetI(loaders, L.objLen(loaders) + 1, f);
        }
コード例 #2
0
        /// <summary>
        /// Register a function in the global table. </summary>
        private static void g(Lua L, LuaTable t, string name, int which)
        {
            PackageLib f = new PackageLib(which, t);

            L.setGlobal(name, f);
        }
コード例 #3
0
        /// <summary>
        /// Register a function. </summary>
        private static void r(Lua L, string name, int which)
        {
            PackageLib f = new PackageLib(which);

            L.setField(L.getGlobal("package"), name, f);
        }