MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / lua_insert

Function lua_insert

src/lapi.cpp:278–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276
277#ifndef PLUTO_LUA_LINKABLE
278LUA_API void lua_insert (lua_State *L, int idx) {
279 StkId p, t;
280 TValue temp;
281 lua_lock(L);
282 p = index2stack(L, idx); /* start of segment */
283 setobj(L, &temp, s2v(L->top.p - 1));
284 for (t = L->top.p - 1; t > p; --t) { /* end of stack segment being rotated */
285 setobjs2s(L, t, t - 1);
286 }
287 setobj2s(L, p, &temp);
288 lua_unlock(L);
289}
290
291LUA_API void lua_remove (lua_State *L, int idx) {
292 StkId p, t;

Callers 15

luaB_coresumeFunction · 0.85
luaB_coxresumeFunction · 0.85
luaB_auxwrapFunction · 0.85
tpackFunction · 0.85
ll_loadlibFunction · 0.85
ll_searchpathFunction · 0.85
trymtFunction · 0.85
prepbuffsizeFunction · 0.85
auxupvalueFunction · 0.85
wasm_to_lua_stackFunction · 0.85
load_auxFunction · 0.85
luaB_pcallFunction · 0.85

Calls 1

index2stackFunction · 0.85

Tested by

no test coverage detected