luac´ -> luai' (to avoid confusion with other luac stuff)

This commit is contained in:
Roberto Ierusalimschy
2005-03-09 13:28:07 -03:00
parent f8df21bd20
commit 370d31a559
14 changed files with 126 additions and 126 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltable.c,v 2.16 2005/03/08 18:09:16 roberto Exp roberto $
** $Id: ltable.c,v 2.17 2005/03/08 20:10:05 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -38,10 +38,10 @@
/*
** max size of array part is 2^MAXBITS
*/
#if LUAC_BITSINT > 26
#if LUAI_BITSINT > 26
#define MAXBITS 26
#else
#define MAXBITS (LUAC_BITSINT-2)
#define MAXBITS (LUAI_BITSINT-2)
#endif
#define MAXASIZE (1 << MAXBITS)
@@ -120,7 +120,7 @@ static int arrayindex (const TValue *key) {
lua_Number n = nvalue(key);
int k;
lua_number2int(k, n);
if (luac_numeq(cast(lua_Number, k), nvalue(key)))
if (luai_numeq(cast(lua_Number, k), nvalue(key)))
return k;
}
return -1; /* `key' did not match some condition */
@@ -437,7 +437,7 @@ const TValue *luaH_getnum (Table *t, int key) {
lua_Number nk = cast(lua_Number, key);
Node *n = hashnum(t, nk);
do { /* check whether `key' is somewhere in the chain */
if (ttisnumber(gkey(n)) && luac_numeq(nvalue(gkey(n)), nk))
if (ttisnumber(gkey(n)) && luai_numeq(nvalue(gkey(n)), nk))
return gval(n); /* that's it */
else n = gnext(n);
} while (n);
@@ -470,7 +470,7 @@ const TValue *luaH_get (Table *t, const TValue *key) {
case LUA_TNUMBER: {
int k;
lua_number2int(k, (nvalue(key)));
if (luac_numeq(cast(lua_Number, k), nvalue(key))) /* index is integer? */
if (luai_numeq(cast(lua_Number, k), nvalue(key))) /* index is integer? */
return luaH_getnum(t, k); /* use specialized version */
/* else go through */
}
@@ -494,7 +494,7 @@ TValue *luaH_set (lua_State *L, Table *t, const TValue *key) {
return cast(TValue *, p);
else {
if (ttisnil(key)) luaG_runerror(L, "table index is nil");
else if (ttisnumber(key) && !luac_numeq(nvalue(key), nvalue(key)))
else if (ttisnumber(key) && !luai_numeq(nvalue(key), nvalue(key)))
luaG_runerror(L, "table index is NaN");
return newkey(L, t, key);
}