diff options
Diffstat (limited to '')
-rw-r--r-- | ltable.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -307,7 +307,7 @@ static unsigned int findindex (lua_State *L, Table *t, TValue *key, | |||
307 | return i; /* yes; that's the index */ | 307 | return i; /* yes; that's the index */ |
308 | else { | 308 | else { |
309 | const TValue *n = getgeneric(t, key, 1); | 309 | const TValue *n = getgeneric(t, key, 1); |
310 | if (unlikely(isabstkey(n))) | 310 | if (l_unlikely(isabstkey(n))) |
311 | luaG_runerror(L, "invalid key to 'next'"); /* key not found */ | 311 | luaG_runerror(L, "invalid key to 'next'"); /* key not found */ |
312 | i = cast_int(nodefromval(n) - gnode(t, 0)); /* key index in hash table */ | 312 | i = cast_int(nodefromval(n) - gnode(t, 0)); /* key index in hash table */ |
313 | /* hash elements are numbered after array ones */ | 313 | /* hash elements are numbered after array ones */ |
@@ -541,7 +541,7 @@ void luaH_resize (lua_State *L, Table *t, unsigned int newasize, | |||
541 | } | 541 | } |
542 | /* allocate new array */ | 542 | /* allocate new array */ |
543 | newarray = luaM_reallocvector(L, t->array, oldasize, newasize, TValue); | 543 | newarray = luaM_reallocvector(L, t->array, oldasize, newasize, TValue); |
544 | if (unlikely(newarray == NULL && newasize > 0)) { /* allocation failed? */ | 544 | if (l_unlikely(newarray == NULL && newasize > 0)) { /* allocation failed? */ |
545 | freehash(L, &newt); /* release new hash part */ | 545 | freehash(L, &newt); /* release new hash part */ |
546 | luaM_error(L); /* raise error (with array unchanged) */ | 546 | luaM_error(L); /* raise error (with array unchanged) */ |
547 | } | 547 | } |
@@ -635,7 +635,7 @@ static Node *getfreepos (Table *t) { | |||
635 | void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) { | 635 | void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) { |
636 | Node *mp; | 636 | Node *mp; |
637 | TValue aux; | 637 | TValue aux; |
638 | if (unlikely(ttisnil(key))) | 638 | if (l_unlikely(ttisnil(key))) |
639 | luaG_runerror(L, "table index is nil"); | 639 | luaG_runerror(L, "table index is nil"); |
640 | else if (ttisfloat(key)) { | 640 | else if (ttisfloat(key)) { |
641 | lua_Number f = fltvalue(key); | 641 | lua_Number f = fltvalue(key); |
@@ -644,7 +644,7 @@ void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) { | |||
644 | setivalue(&aux, k); | 644 | setivalue(&aux, k); |
645 | key = &aux; /* insert it as an integer */ | 645 | key = &aux; /* insert it as an integer */ |
646 | } | 646 | } |
647 | else if (unlikely(luai_numisnan(f))) | 647 | else if (l_unlikely(luai_numisnan(f))) |
648 | luaG_runerror(L, "table index is NaN"); | 648 | luaG_runerror(L, "table index is NaN"); |
649 | } | 649 | } |
650 | if (ttisnil(value)) | 650 | if (ttisnil(value)) |