Browse Source

small improvements.

v5-2
Roberto Ierusalimschy 26 years ago
parent
commit
63a752f961
  1. 6
      lobject.c
  2. 6
      lobject.h

6
lobject.c

@ -1,5 +1,5 @@
/*
** $Id: lobject.c,v 1.13 1998/06/19 16:14:09 roberto Exp $
** $Id: lobject.c,v 1.14 1998/12/27 20:25:20 roberto Exp roberto $
** Some generic functions over Lua objects
** See Copyright Notice in lua.h
*/
@ -40,9 +40,7 @@ int luaO_redimension (int oldsize)
}
int luaO_equalObj (TObject *t1, TObject *t2)
{
if (ttype(t1) != ttype(t2)) return 0;
int luaO_equalval (TObject *t1, TObject *t2) {
switch (ttype(t1)) {
case LUA_T_NIL: return 1;
case LUA_T_NUMBER: return nvalue(t1) == nvalue(t2);

6
lobject.h

@ -1,5 +1,5 @@
/*
** $Id: lobject.h,v 1.23 1998/12/01 19:09:47 roberto Exp $
** $Id: lobject.h,v 1.24 1998/12/27 20:25:20 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@ -193,7 +193,9 @@ extern char *luaO_typenames[];
extern TObject luaO_nilobject;
int luaO_equalObj (TObject *t1, TObject *t2);
#define luaO_equalObj(t1,t2) ((ttype(t1) != ttype(t2)) ? 0 \
: luaO_equalval(t1,t2))
int luaO_equalval (TObject *t1, TObject *t2);
int luaO_redimension (int oldsize);
void luaO_insertlist (GCnode *root, GCnode *node);
double luaO_str2d (char *s);

Loading…
Cancel
Save