MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / reverse

Function reverse

third-party/lua-5.5.0/src/lapi.c:224–231  ·  view source on GitHub ↗

** Reverse the stack segment from 'from' to 'to' ** (auxiliary to 'lua_rotate') ** Note that we move(copy) only the value inside the stack. ** (We do not move additional fields that may exist.) */

Source from the content-addressed store, hash-verified

222** (We do not move additional fields that may exist.)
223*/
224static void reverse (lua_State *L, StkId from, StkId to) {
225 for (; from < to; from++, to--) {
226 TValue temp;
227 setobj(L, &temp, s2v(from));
228 setobjs2s(L, from, to);
229 setobj2s(L, to, &temp);
230 }
231}
232
233
234/*

Callers 2

lua_rotateFunction · 0.70
write_numberMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected