Esempio n. 1
0
        public delegate void luaC_condGC_pos();         //FIXME: added

        public static void luaC_condGC(lua_State L, luaC_condGC_pre pre, luaC_condGC_pos pos)
        {
            if (G(L).GCdebt > 0)
            {
                pre(); luaC_step(L); pos();
            }
            ;                                                                  //FIXME:???macro
            condchangemem(L, pre, pos);
        }
Esempio n. 2
0
 /*
 ** Macro to check stack size and grow stack if needed.  Parameters
 ** 'pre'/'pos' allow the macro to preserve a pointer into the
 ** stack across reallocations, doing the work only when needed.
 ** 'condmovestack' is used in heavy tests to force a stack reallocation
 ** at every check.
 */
 public static void luaD_checkstackaux(lua_State L, int n, luaC_condGC_pre pre, luaC_condGC_pos pos)
 {
     if (L.stack_last - L.top <= (n))
     {
         pre(); luaD_growstack(L, n); pos();
     }
     else
     {
         condmovestack(L, pre, pos);
     }
 }