Exemple #1
0
        public GCHandle PushCSharpClosure(CSharpFunctionDelegate f, int n)
        {
            GCHandle handle = GCHandle.Alloc(f);
            IntPtr   p      = GCHandle.ToIntPtr(handle);

            LuaAPI.lua_pushlightuserdata(this.luaPtr, p);
            LuaAPI.lua_insert(this.luaPtr, -(n + 1));
            LuaAPI.lua_pushcclosure(this.luaPtr, this.pfnDispatch, n + 1);
            return(handle);
        }
Exemple #2
0
 public void Insert(int index)
 {
     LuaAPI.lua_insert(this.luaPtr, index);
 }