| 537 | |
| 538 | |
| 539 | TValue *luaH_setnum (lua_State *L, Table *t, int key) { |
| 540 | const TValue *p = luaH_getnum(t, key); |
| 541 | if (p != luaO_nilobject) { |
| 542 | check_readonlyold(L, t, cast(TValue *, p)); /*BZ*/ |
| 543 | return cast(TValue *, p); |
| 544 | } |
| 545 | else { |
| 546 | TValue k; |
| 547 | check_readonlynew(L, t); /*BZ*/ |
| 548 | setnvalue(&k, cast_num(key)); |
| 549 | return newkey(L, t, &k); |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | |
| 554 | TValue *luaH_setstr (lua_State *L, Table *t, TString *key) { |
no test coverage detected