MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / reverse

Function reverse

lib/lua/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 2

lua_rotateFunction · 0.85
clearMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected