** beware: when using this function you probably need to check a GC ** barrier and invalidate the TM cache. */
| 508 | ** barrier and invalidate the TM cache. |
| 509 | */ |
| 510 | TValue *luaH_set (lua_State *L, Table *t, const TValue *key) { |
| 511 | const TValue *p = luaH_get(t, key); |
| 512 | if (p != luaO_nilobject) |
| 513 | return cast(TValue *, p); |
| 514 | else return luaH_newkey(L, t, key); |
| 515 | } |
| 516 | |
| 517 | |
| 518 | void luaH_setint (lua_State *L, Table *t, int key, TValue *value) { |
no test coverage detected