예제 #1
0
파일: ldebug.cs 프로젝트: chenzuo/SharpLua
 /*
 ** this function can be called asynchronous (e.g. during a signal)
 */
 public static int lua_sethook(LuaState L, lua_Hook func, int mask, int count)
 {
     if (func == null || mask == 0)
     {  /* turn off hooks? */
         mask = 0;
         func = null;
     }
     L.hook = func;
     L.basehookcount = count;
     resethookcount(L);
     L.hookmask = cast_byte(mask);
     return 1;
 }
예제 #2
0
 /*
 ** this function can be called asynchronous (e.g. during a signal)
 */
 public static int lua_sethook(lua_State L, lua_Hook func, int mask, int count)
 {
     if (func == null || mask == 0)          /* turn off hooks? */
     {
         mask = 0;
         func = null;
     }
     if (isLua(L.ci) != 0)
     {
         L.oldpc = L.ci.u.l.savedpc;
     }
     L.hook          = func;
     L.basehookcount = count;
     resethookcount(L);
     L.hookmask = cast_byte(mask);
     return(1);
 }
예제 #3
0
        private static int db_gethook(lua_State L)
        {
            int       arg;
            lua_State L1   = getthread(L, out arg);
            CharPtr   buff = new char[5];
            int       mask = lua_gethookmask(L1);
            lua_Hook  hook = lua_gethook(L1);

            if (hook != null && hook != hookf)        /* external hook? */
            {
                lua_pushliteral(L, "external hook");
            }
            else
            {
                gethooktable(L);
                lua_rawgetp(L, -1, L1); /* get hook */
                lua_remove(L, -2);      /* remove hook table */
            }
            lua_pushstring(L, unmakemask(mask, buff));
            lua_pushinteger(L, lua_gethookcount(L1));
            return(3);
        }
예제 #4
0
 [DllImport("lua")] extern public static void lua_sethook(IntPtr L, lua_Hook func, int mask, int count);
예제 #5
0
 public static int lua_sethook(this LuaState luaState, lua_Hook f, int mask, int count) => Lua.lua_sethook(luaState, f, mask, count);
예제 #6
0
 public static int lua_sethook(lua_Hook f, int mask, int count) => lua_sethook(_state, f, mask, count);
예제 #7
0
 public static extern int lua_sethook(LuaState luaState, lua_Hook f, int mask, int count);
예제 #8
0
 public static int lua_sethook(lua_Hook f, int mask, int count) => lua_sethook(_state, f, mask, count);
예제 #9
0
 public extern static void lua_sethook(lua_State L, lua_Hook func, int mask, int count);
예제 #10
0
 public static extern int lua_sethook(lua_State_ptr L, lua_Hook func, int mask, int count);
예제 #11
0
파일: Lua.cs 프로젝트: xiuzhifu/Redirection
        public static void lua_sethook(IntPtr L, lua_Hook func, int mask, int count)
        {
            IntPtr funcHook = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func);

            NativeMethods.lua_sethook(L, funcHook, mask, count);
        }
예제 #12
0
        public static int lua_sethook(IntPtr luaState, lua_Hook func, int mask, int count)
        {
            IntPtr funcHook = Marshal.GetFunctionPointerForDelegate(func);

            return(lua_sethook(luaState, funcHook, mask, count));
        }
 public static int lua_sethook(this LuaState luaState, lua_Hook f, int mask, int count) => Lua.lua_sethook(luaState, f, mask, count);
예제 #14
0
 public static void lua_sethook(lua_State luaState, lua_Hook func, int mask, int count) => lua_sethook(luaState, func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func), mask, count);
예제 #15
0
 public static extern int lua_sethook(lua_State L, lua_Hook func, int mask, int count);
예제 #16
0
파일: Melua.cs 프로젝트: learnmove/melia
 public static extern int lua_sethook(IntPtr L, lua_Hook func, int mask, int count);
예제 #17
0
 public static extern int lua_sethook(LuaState luaState, lua_Hook f, int mask, int count);