MCPcopy Create free account
hub / github.com/F-Stack/f-stack / adjust_varargs

Function adjust_varargs

freebsd/contrib/openzfs/module/lua/ldo.c:327–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325
326
327static StkId adjust_varargs (lua_State *L, Proto *p, int actual) {
328 int i;
329 int nfixargs = p->numparams;
330 StkId base, fixed;
331 lua_assert(actual >= nfixargs);
332 /* move fixed parameters to final position */
333 luaD_checkstack(L, p->maxstacksize); /* check again for new 'base' */
334 fixed = L->top - actual; /* first fixed argument */
335 base = L->top; /* final position of first argument */
336 for (i=0; i<nfixargs; i++) {
337 setobjs2s(L, L->top++, fixed + i);
338 setnilvalue(fixed + i);
339 }
340 return base;
341}
342
343
344static StkId tryfuncTM (lua_State *L, StkId func) {

Callers 1

luaD_precallFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected