lua_newthread() private method

private lua_newthread ( IntPtr L ) : IntPtr
L System.IntPtr
return System.IntPtr
コード例 #1
0
ファイル: Lua.cs プロジェクト: SilverlineDev/bizhawk
        public Lua NewThread()
        {
            var lua = new Lua(true);

            lua.translator = translator;
            lua.luaState   = LuaDLL.lua_newthread(luaState);
            return(lua);
        }
コード例 #2
0
        public LuaThread(LuaState parentState, LuaFunction threadFunc)
        {
            // Copy from parent
            this.tracebackFunction      = parentState.tracebackFunction;
            this.translator             = parentState.translator;
            this.translator.interpreter = this;

            this.panicCallback = parentState.panicCallback;

            this.printFunction    = parentState.printFunction;
            this.loadfileFunction = parentState.loadfileFunction;
            this.loaderFunction   = parentState.loaderFunction;
            this.dofileFunction   = parentState.dofileFunction;

            // Assign to store
            func   = threadFunc;
            parent = parentState;

            // Create Thread
            L = LuaDLL.lua_newthread(parent.L);

            // Store thread in registry
            threadRef = LuaDLL.luaL_ref(parent.L, LuaIndexes.LUA_REGISTRYINDEX);
        }
コード例 #3
0
 public IntPtr LuaNewThread()
 {
     return(LuaDLL.lua_newthread(L));
 }