Exemplo n.º 1
0
        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);
        }
Exemplo n.º 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);
        }