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

Function reverse

third-party/lua-5.4.6/src/lapi.c:227–234  ·  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

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

Callers 1

lua_rotateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected