diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-29 17:11:36 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-29 17:11:36 -0200 |
commit | 49af08e3e7d1b8e369567f241d06eb6933fd6518 (patch) | |
tree | 0551ba7c4e2404c1fc124bdd4f86b6deea9ae62f | |
parent | c5fa0895e98a3e915f01003f8ae29cde31243cc8 (diff) | |
download | lua-49af08e3e7d1b8e369567f241d06eb6933fd6518.tar.gz lua-49af08e3e7d1b8e369567f241d06eb6933fd6518.tar.bz2 lua-49af08e3e7d1b8e369567f241d06eb6933fd6518.zip |
new name for lua_equal(obj); LUA_NOOBJECT is equal to LUA_NOOBJECT
-rw-r--r-- | lapi.c | 6 | ||||
-rw-r--r-- | lbuiltin.c | 4 | ||||
-rw-r--r-- | lua.h | 6 |
3 files changed, 8 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.57 1999/11/22 13:12:07 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.58 1999/11/23 13:58:02 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -240,8 +240,8 @@ int lua_isfunction (lua_State *L, lua_Object o) { | |||
240 | return (t == LUA_T_PROTO) || (t == LUA_T_CPROTO); | 240 | return (t == LUA_T_PROTO) || (t == LUA_T_CPROTO); |
241 | } | 241 | } |
242 | 242 | ||
243 | int lua_equalobj (lua_State *L, lua_Object o1, lua_Object o2) { | 243 | int lua_equal(lua_State *L, lua_Object o1, lua_Object o2) { |
244 | if (o1 == LUA_NOOBJECT || o2 == LUA_NOOBJECT) return 0; | 244 | if (o1 == LUA_NOOBJECT || o2 == LUA_NOOBJECT) return (o1 == o2); |
245 | else return luaO_equalObj(Address(L, o1), Address(L, o2)); | 245 | else return luaO_equalObj(Address(L, o1), Address(L, o2)); |
246 | } | 246 | } |
247 | 247 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbuiltin.c,v 1.75 1999/11/22 17:39:51 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.76 1999/11/26 18:53:03 roberto Exp roberto $ |
3 | ** Built-in functions | 3 | ** Built-in functions |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -743,7 +743,7 @@ static void testC (lua_State *L) { | |||
743 | lua_pushnumber(L, n); break; | 743 | lua_pushnumber(L, n); break; |
744 | } | 744 | } |
745 | case 'q' : { int n1=getnum(L, s); int n2=getnum(L, s); | 745 | case 'q' : { int n1=getnum(L, s); int n2=getnum(L, s); |
746 | lua_pushnumber(L, lua_equalobj(L, reg[n1], reg[n2])); | 746 | lua_pushnumber(L, lua_equal(L, reg[n1], reg[n2])); |
747 | break; | 747 | break; |
748 | } | 748 | } |
749 | default: luaL_verror(L, "unknown command in `testC': %c", *(s-1)); | 749 | default: luaL_verror(L, "unknown command in `testC': %c", *(s-1)); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.38 1999/11/22 13:12:07 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.39 1999/11/25 18:44:02 roberto Exp roberto $ |
3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
4 | ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil | 4 | ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil |
5 | ** e-mail: lua@tecgraf.puc-rio.br | 5 | ** e-mail: lua@tecgraf.puc-rio.br |
@@ -66,7 +66,7 @@ int lua_isnumber (lua_State *L, lua_Object object); | |||
66 | int lua_isstring (lua_State *L, lua_Object object); | 66 | int lua_isstring (lua_State *L, lua_Object object); |
67 | int lua_isfunction (lua_State *L, lua_Object object); | 67 | int lua_isfunction (lua_State *L, lua_Object object); |
68 | 68 | ||
69 | int lua_equalobj (lua_State *L, lua_Object o1, lua_Object o2); | 69 | int lua_equal (lua_State *L, lua_Object o1, lua_Object o2); |
70 | 70 | ||
71 | double lua_getnumber (lua_State *L, lua_Object object); | 71 | double lua_getnumber (lua_State *L, lua_Object object); |
72 | const char *lua_getstring (lua_State *L, lua_Object object); | 72 | const char *lua_getstring (lua_State *L, lua_Object object); |
@@ -179,7 +179,7 @@ extern lua_State *lua_state; | |||
179 | #define lua_isnumber(object) (lua_isnumber)(lua_state, object) | 179 | #define lua_isnumber(object) (lua_isnumber)(lua_state, object) |
180 | #define lua_isstring(object) (lua_isstring)(lua_state, object) | 180 | #define lua_isstring(object) (lua_isstring)(lua_state, object) |
181 | #define lua_isfunction(object) (lua_isfunction)(lua_state, object) | 181 | #define lua_isfunction(object) (lua_isfunction)(lua_state, object) |
182 | #define lua_equalobj(o1,o2) (lua_equalobj)(lua_state, o1,o2) | 182 | #define lua_equal(o1,o2) (lua_equal)(lua_state, o1,o2) |
183 | #define lua_getnumber(object) (lua_getnumber)(lua_state, object) | 183 | #define lua_getnumber(object) (lua_getnumber)(lua_state, object) |
184 | #define lua_getstring(object) (lua_getstring)(lua_state, object) | 184 | #define lua_getstring(object) (lua_getstring)(lua_state, object) |
185 | #define lua_strlen(object) (lua_strlen)(lua_state, object) | 185 | #define lua_strlen(object) (lua_strlen)(lua_state, object) |