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

Function lua_replace

src/lapi.cpp:302–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302LUA_API void lua_replace (lua_State *L, int toidx) {
303 TValue *fr, *to;
304 lua_lock(L);
305 fr = index2value(L, -1);
306 to = index2value(L, toidx);
307 api_check(L, isvalid(L, to), "invalid index");
308 setobj(L, to, fr);
309 if (isupvalue(toidx)) /* function upvalue? */
310 luaC_barrier(L, clCvalue(s2v(L->ci->func.p)), fr);
311 L->top.p--;
312 lua_unlock(L);
313}
314#endif
315
316

Callers 7

sortFunction · 0.85
treduceFunction · 0.85
writerFunction · 0.85
io_linesFunction · 0.85
findfieldFunction · 0.85
generic_readerFunction · 0.85
checkbigintFunction · 0.85

Calls 1

index2valueFunction · 0.85

Tested by

no test coverage detected