コード例 #1
0
ファイル: Lua.cs プロジェクト: schlumpf2009/Nlua_Performance
        static void DebugHookCallback(LuaState luaState, IntPtr luaDebug)
        {
            LuaDebug debug = (LuaDebug)System.Runtime.InteropServices.Marshal.PtrToStructure(luaDebug, typeof(LuaDebug));
#endif
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(luaState);
            Lua lua = translator.Interpreter;
            lua.DebugHookCallbackInternal(luaState, debug);
        }
コード例 #2
0
        static void DebugHookCallback(IntPtr luaState, IntPtr luaDebug)
        {
            var state = LuaState.FromIntPtr(luaState);

            state.GetStack(0, luaDebug);

            if (!state.GetInfo("Snlu", luaDebug))
            {
                return;
            }

            var debug = LuaDebug.FromIntPtr(luaDebug);

            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(state);
            Lua lua = translator.Interpreter;

            lua.DebugHookCallbackInternal(state, debug);
        }