MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / luaK_setreturns

Function luaK_setreturns

lua/src/lcode.c:721–731  ·  view source on GitHub ↗

** Fix an expression to return the number of results 'nresults'. ** 'e' must be a multi-ret expression (function call or vararg). */

Source from the content-addressed store, hash-verified

719** 'e' must be a multi-ret expression (function call or vararg).
720*/
721void luaK_setreturns (FuncState *fs, expdesc *e, int nresults) {
722 Instruction *pc = &getinstruction(fs, e);
723 if (e->k == VCALL) /* expression is an open function call? */
724 SETARG_C(*pc, nresults + 1);
725 else {
726 lua_assert(e->k == VVARARG);
727 SETARG_C(*pc, nresults + 1);
728 SETARG_A(*pc, fs->freereg);
729 luaK_reserveregs(fs, 1);
730 }
731}
732
733
734/*

Callers 1

adjust_assignFunction · 0.85

Calls 1

luaK_reserveregsFunction · 0.85

Tested by

no test coverage detected