MCPcopy Create free account
hub / github.com/DFHack/dfhack / findvararg

Function findvararg

depends/lua/src/ldebug.c:134–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132
133
134static const char *findvararg (CallInfo *ci, int n, StkId *pos) {
135 int nparams = clLvalue(ci->func)->p->numparams;
136 int nvararg = cast_int(ci->u.l.base - ci->func) - nparams;
137 if (n <= -nvararg)
138 return NULL; /* no such vararg */
139 else {
140 *pos = ci->func + nparams - n;
141 return "(*vararg)"; /* generic name for any vararg */
142 }
143}
144
145
146static const char *findlocal (lua_State *L, CallInfo *ci, int n,

Callers 1

findlocalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected