** beware: when using this function you probably need to check a GC ** barrier and invalidate the TM cache. */
| 723 | ** barrier and invalidate the TM cache. |
| 724 | */ |
| 725 | TValue *luaH_set(lua_State *L, Table *t, const TValue *key) { |
| 726 | const TValue *p = luaH_get(t, key); |
| 727 | if (p != luaO_nilobject) |
| 728 | return lua_cast(TValue *, p); |
| 729 | else return luaH_newkey(L, t, key); |
| 730 | } |
| 731 | |
| 732 | |
| 733 | void luaH_setint(lua_State *L, Table *t, lua_Integer key, TValue *value) { |
no test coverage detected