| 492 | |
| 493 | |
| 494 | TValue *luaH_set (lua_State *L, Table *t, const TValue *key) { |
| 495 | const TValue *p = luaH_get(t, key); |
| 496 | t->flags = 0; |
| 497 | if (p != luaO_nilobject) |
| 498 | return cast(TValue *, p); |
| 499 | else { |
| 500 | if (ttisnil(key)) luaG_runerror(L, "table index is nil"); |
| 501 | else if (ttisnumber(key) && luai_numisnan(nvalue(key))) |
| 502 | luaG_runerror(L, "table index is NaN"); |
| 503 | return newkey(L, t, key); |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | |
| 508 | TValue *luaH_setnum (lua_State *L, Table *t, int key) { |
no test coverage detected