commit 49af08e3e7d1b8e369567f241d06eb6933fd6518
parent c5fa0895e98a3e915f01003f8ae29cde31243cc8
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Mon, 29 Nov 1999 17:11:14 -0200
new name for lua_equal(obj); LUA_NOOBJECT is equal to LUA_NOOBJECT
Diffstat:
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lapi.c b/lapi.c
@@ -1,5 +1,5 @@
/*
-** $Id: lapi.c,v 1.57 1999/11/22 13:12:07 roberto Exp roberto $
+** $Id: lapi.c,v 1.58 1999/11/23 13:58:02 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -240,8 +240,8 @@ int lua_isfunction (lua_State *L, lua_Object o) {
return (t == LUA_T_PROTO) || (t == LUA_T_CPROTO);
}
-int lua_equalobj (lua_State *L, lua_Object o1, lua_Object o2) {
- if (o1 == LUA_NOOBJECT || o2 == LUA_NOOBJECT) return 0;
+int lua_equal(lua_State *L, lua_Object o1, lua_Object o2) {
+ if (o1 == LUA_NOOBJECT || o2 == LUA_NOOBJECT) return (o1 == o2);
else return luaO_equalObj(Address(L, o1), Address(L, o2));
}
diff --git a/lbuiltin.c b/lbuiltin.c
@@ -1,5 +1,5 @@
/*
-** $Id: lbuiltin.c,v 1.75 1999/11/22 17:39:51 roberto Exp roberto $
+** $Id: lbuiltin.c,v 1.76 1999/11/26 18:53:03 roberto Exp roberto $
** Built-in functions
** See Copyright Notice in lua.h
*/
@@ -743,7 +743,7 @@ static void testC (lua_State *L) {
lua_pushnumber(L, n); break;
}
case 'q' : { int n1=getnum(L, s); int n2=getnum(L, s);
- lua_pushnumber(L, lua_equalobj(L, reg[n1], reg[n2]));
+ lua_pushnumber(L, lua_equal(L, reg[n1], reg[n2]));
break;
}
default: luaL_verror(L, "unknown command in `testC': %c", *(s-1));
diff --git a/lua.h b/lua.h
@@ -1,5 +1,5 @@
/*
-** $Id: lua.h,v 1.38 1999/11/22 13:12:07 roberto Exp roberto $
+** $Id: lua.h,v 1.39 1999/11/25 18:44:02 roberto Exp roberto $
** Lua - An Extensible Extension Language
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
** e-mail: lua@tecgraf.puc-rio.br
@@ -66,7 +66,7 @@ int lua_isnumber (lua_State *L, lua_Object object);
int lua_isstring (lua_State *L, lua_Object object);
int lua_isfunction (lua_State *L, lua_Object object);
-int lua_equalobj (lua_State *L, lua_Object o1, lua_Object o2);
+int lua_equal (lua_State *L, lua_Object o1, lua_Object o2);
double lua_getnumber (lua_State *L, lua_Object object);
const char *lua_getstring (lua_State *L, lua_Object object);
@@ -179,7 +179,7 @@ extern lua_State *lua_state;
#define lua_isnumber(object) (lua_isnumber)(lua_state, object)
#define lua_isstring(object) (lua_isstring)(lua_state, object)
#define lua_isfunction(object) (lua_isfunction)(lua_state, object)
-#define lua_equalobj(o1,o2) (lua_equalobj)(lua_state, o1,o2)
+#define lua_equal(o1,o2) (lua_equal)(lua_state, o1,o2)
#define lua_getnumber(object) (lua_getnumber)(lua_state, object)
#define lua_getstring(object) (lua_getstring)(lua_state, object)
#define lua_strlen(object) (lua_strlen)(lua_state, object)