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

Function lua_rawsetp

depends/lua/src/lapi.c:830–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828
829
830LUA_API void lua_rawsetp (lua_State *L, int idx, const void *p) {
831 StkId o;
832 TValue k, *slot;
833 lua_lock(L);
834 api_checknelems(L, 1);
835 o = index2addr(L, idx);
836 api_check(L, ttistable(o), "table expected");
837 setpvalue(&k, cast(void *, p));
838 slot = luaH_set(L, hvalue(o), &k);
839 setobj2t(L, slot, L->top - 1);
840 luaC_barrierback(L, hvalue(o), L->top - 1);
841 L->top--;
842 lua_unlock(L);
843}
844
845
846LUA_API int lua_setmetatable (lua_State *L, int objindex) {

Callers 15

set_dfhack_outputFunction · 0.85
RunCoreQueryLoopMethod · 0.85
SetPrivateCallbackMethod · 0.85
MakeMethod · 0.85
OpenMethod · 0.85
InitCoreContextMethod · 0.85
OpenMatinfoFunction · 0.85
OpenPenFunction · 0.85
OpenPenArrayFunction · 0.85
OpenRandomFunction · 0.85
SaveInTableMethod · 0.85
MakeMetatableMethod · 0.85

Calls 3

index2addrFunction · 0.85
castFunction · 0.85
luaH_setFunction · 0.85

Tested by

no test coverage detected