MCPcopy Create free account
hub / github.com/DFHack/dfhack / lua_xmove

Function lua_xmove

depends/lua/src/lapi.c:118–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116
117
118LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
119 int i;
120 if (from == to) return;
121 lua_lock(to);
122 api_checknelems(from, n);
123 api_check(from, G(from) == G(to), "moving among independent states");
124 api_check(from, to->ci->top - to->top >= n, "stack overflow");
125 from->top -= n;
126 for (i = 0; i < n; i++) {
127 setobj2s(to, to->top, from->top + i);
128 to->top++; /* stack already checked by previous 'api_check' */
129 }
130 lua_unlock(to);
131}
132
133
134LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) {

Callers 11

convert_to_exceptionFunction · 0.85
resume_helperFunction · 0.85
NewCoroutineMethod · 0.85
auxresumeFunction · 0.85
luaB_cocreateFunction · 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

no outgoing calls

Tested by

no test coverage detected