new API function `lua_equalobj'

This commit is contained in:
Roberto Ierusalimschy
1999-11-11 15:02:40 -02:00
parent a6755e2f1a
commit 573372665a
3 changed files with 18 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lbuiltin.c,v 1.70 1999/11/04 17:22:26 roberto Exp roberto $
** $Id: lbuiltin.c,v 1.71 1999/11/10 15:41:11 roberto Exp roberto $
** Built-in functions
** See Copyright Notice in lua.h
*/
@@ -741,6 +741,10 @@ static void testC (void) {
n=lua_next(reg[n], (int)lua_getnumber(reg[getnum(s)]));
lua_pushnumber(n); break;
}
case 'q' : { int n1=getnum(s); int n2=getnum(s);
lua_pushnumber(lua_equalobj(reg[n1], reg[n2]));
break;
}
default: luaL_verror("unknown command in `testC': %c", *(s-1));
}
if (*s == 0) return;