Garbage collection of functions + header structure for functions
This commit is contained in:
6
hash.c
6
hash.c
@@ -3,7 +3,7 @@
|
||||
** hash manager for lua
|
||||
*/
|
||||
|
||||
char *rcs_hash="$Id: hash.c,v 2.24 1995/02/06 19:34:03 roberto Exp roberto $";
|
||||
char *rcs_hash="$Id: hash.c,v 2.25 1995/05/02 18:43:03 roberto Exp $";
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -70,7 +70,7 @@ static Word hashindex (Hash *t, Object *ref) /* hash function */
|
||||
return (Word)h%nhash(t); /* make it a valid index */
|
||||
}
|
||||
case LUA_T_FUNCTION:
|
||||
return (((IntPoint)bvalue(ref))%nhash(t));
|
||||
return (((IntPoint)ref->value.tf)%nhash(t));
|
||||
case LUA_T_CFUNCTION:
|
||||
return (((IntPoint)fvalue(ref))%nhash(t));
|
||||
case LUA_T_ARRAY:
|
||||
@@ -89,7 +89,7 @@ Bool lua_equalObj (Object *t1, Object *t2)
|
||||
case LUA_T_NUMBER: return nvalue(t1) == nvalue(t2);
|
||||
case LUA_T_STRING: return streq(svalue(t1), svalue(t2));
|
||||
case LUA_T_ARRAY: return avalue(t1) == avalue(t2);
|
||||
case LUA_T_FUNCTION: return bvalue(t1) == bvalue(t2);
|
||||
case LUA_T_FUNCTION: return t1->value.tf == t2->value.tf;
|
||||
case LUA_T_CFUNCTION: return fvalue(t1) == fvalue(t2);
|
||||
default: return uvalue(t1) == uvalue(t2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user