MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaH_pset

Function luaH_pset

third-party/lua-5.5.0/src/ltable.c:1132–1146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1130
1131
1132int luaH_pset (Table *t, const TValue *key, TValue *val) {
1133 switch (ttypetag(key)) {
1134 case LUA_VSHRSTR: return luaH_psetshortstr(t, tsvalue(key), val);
1135 case LUA_VNUMINT: return psetint(t, ivalue(key), val);
1136 case LUA_VNIL: return HNOTFOUND;
1137 case LUA_VNUMFLT: {
1138 lua_Integer k;
1139 if (luaV_flttointeger(fltvalue(key), &k, F2Ieq)) /* integral index? */
1140 return psetint(t, k, val); /* use specialized version */
1141 /* else... */
1142 } /* FALLTHROUGH */
1143 default:
1144 return finishnodeset(t, getgeneric(t, key, 0), val);
1145 }
1146}
1147
1148/*
1149** Finish a raw "set table" operation, where 'hres' encodes where the

Callers 1

luaH_setFunction · 0.85

Calls 5

luaH_psetshortstrFunction · 0.85
psetintFunction · 0.85
finishnodesetFunction · 0.85
luaV_flttointegerFunction · 0.70
getgenericFunction · 0.70

Tested by

no test coverage detected