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

Function lua_xmove

lib/lua/src/lapi.c:128–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127
128LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
129 int i;
130 if (from == to) return;
131 lua_lock(to);
132 api_checknelems(from, n);
133 api_check(from, G(from) == G(to), "moving among independent states");
134 api_check(from, to->ci->top.p - to->top.p >= n, "stack overflow");
135 from->top.p -= n;
136 for (i = 0; i < n; i++) {
137 setobjs2s(to, to->top.p, from->top.p + i);
138 to->top.p++; /* stack already checked by previous 'api_check' */
139 }
140 lua_unlock(to);
141}
142
143
144LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) {

Callers 10

auxresumeFunction · 0.85
luaB_auxwrapFunction · 0.85
luaB_cocreateFunction · 0.85
luaB_closeFunction · 0.85
treatstackoptionFunction · 0.85
db_getinfoFunction · 0.85
db_getlocalFunction · 0.85
db_setlocalFunction · 0.85
db_sethookFunction · 0.85
db_gethookFunction · 0.85

Calls 1

GFunction · 0.50

Tested by

no test coverage detected