MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lua_rawsetp

Function lua_rawsetp

freebsd/contrib/openzfs/module/lua/lapi.c:794–806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792
793
794LUA_API void lua_rawsetp (lua_State *L, int idx, const void *p) {
795 StkId t;
796 TValue k;
797 lua_lock(L);
798 api_checknelems(L, 1);
799 t = index2addr(L, idx);
800 api_check(L, ttistable(t), "table expected");
801 setpvalue(&k, cast(void *, p));
802 setobj2t(L, luaH_set(L, hvalue(t), &k), L->top - 1);
803 luaC_barrierback(L, gcvalue(t), L->top - 1);
804 L->top--;
805 lua_unlock(L);
806}
807
808
809LUA_API int lua_setmetatable (lua_State *L, int objindex) {

Callers

nothing calls this directly

Calls 3

index2addrFunction · 0.85
luaC_barrierbackFunction · 0.85
luaH_setFunction · 0.70

Tested by

no test coverage detected