| 912 | |
| 913 | |
| 914 | static void luaH_newkey (lua_State *L, Table *t, const TValue *key, |
| 915 | TValue *value) { |
| 916 | if (!ttisnil(value)) { /* do not insert nil values */ |
| 917 | int done = insertkey(t, key, value); |
| 918 | if (!done) { /* could not find a free place? */ |
| 919 | rehash(L, t, key); /* grow table */ |
| 920 | newcheckedkey(t, key, value); /* insert key in grown table */ |
| 921 | } |
| 922 | luaC_barrierback(L, obj2gco(t), key); |
| 923 | /* for debugging only: any new key may force an emergency collection */ |
| 924 | condchangemem(L, (void)0, (void)0, 1); |
| 925 | } |
| 926 | } |
| 927 | |
| 928 | |
| 929 | static const TValue *getintfromhash (Table *t, lua_Integer key) { |
no test coverage detected