MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / lua_rawsetp

Function lua_rawsetp

src/Chain/libraries/glua/lapi.cpp:832–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

createclibstableFunction · 0.85
db_sethookFunction · 0.85

Calls 2

index2addrFunction · 0.85
luaH_setFunction · 0.85

Tested by

no test coverage detected