public static dec ( lua_TValue &value ) : lua_TValue | ||
value | lua_TValue | |
return | lua_TValue |
public static CharPtr lua_setlocal(lua_State L, lua_Debug ar, int n) { CallInfo ci = L.base_ci[ar.i_ci]; CharPtr name = findlocal(L, ci, n); lua_lock(L); if (name != null) { setobjs2s(L, ci.base_[n - 1], L.top - 1); } StkId.dec(ref L.top); /* pop value */ lua_unlock(L); return(name); }
static StkId tryfuncTM(lua_State L, StkId func) { /*const*/ TValue tm = luaT_gettmbyobj(L, func, TMS.TM_CALL); StkId p; ptrdiff_t funcr = savestack(L, func); if (!ttisfunction(tm)) { luaG_typeerror(L, func, "call"); } /* Open a hole inside the stack at `func' */ for (p = L.top; p > func; StkId.dec(ref p)) { setobjs2s(L, p, p - 1); } incr_top(L); func = restorestack(L, funcr); /* previous call may change stack */ setobj2s(L, func, tm); /* tag method is the new function to be called */ return(func); }
public static int lua_getinfo(lua_State L, CharPtr what, lua_Debug ar) { int status; Closure f = null; CallInfo ci = null; lua_lock(L); if (what == '>') { StkId func = L.top - 1; luai_apicheck(L, ttisfunction(func)); what = what.next(); /* skip the '>' */ f = clvalue(func); StkId.dec(ref L.top); /* pop function */ } else if (ar.i_ci != 0) /* no tail call? */ { ci = L.base_ci[ar.i_ci]; lua_assert(ttisfunction(ci.func)); f = clvalue(ci.func); } status = auxgetinfo(L, what, ar, f, ci); if (strchr(what, 'f') != null) { if (f == null) { setnilvalue(L.top); } else { setclvalue(L, L.top, f); } incr_top(L); } if (strchr(what, 'L') != null) { collectvalidlines(L, f); } lua_unlock(L); return(status); }