aboutsummaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index 22e7d547..d2014293 100644
--- a/hash.c
+++ b/hash.c
@@ -3,7 +3,7 @@
3** hash manager for lua 3** hash manager for lua
4*/ 4*/
5 5
6char *rcs_hash="$Id: hash.c,v 2.24 1995/02/06 19:34:03 roberto Exp roberto $"; 6char *rcs_hash="$Id: hash.c,v 2.25 1995/05/02 18:43:03 roberto Exp $";
7 7
8#include <string.h> 8#include <string.h>
9 9
@@ -70,7 +70,7 @@ static Word hashindex (Hash *t, Object *ref) /* hash function */
70 return (Word)h%nhash(t); /* make it a valid index */ 70 return (Word)h%nhash(t); /* make it a valid index */
71 } 71 }
72 case LUA_T_FUNCTION: 72 case LUA_T_FUNCTION:
73 return (((IntPoint)bvalue(ref))%nhash(t)); 73 return (((IntPoint)ref->value.tf)%nhash(t));
74 case LUA_T_CFUNCTION: 74 case LUA_T_CFUNCTION:
75 return (((IntPoint)fvalue(ref))%nhash(t)); 75 return (((IntPoint)fvalue(ref))%nhash(t));
76 case LUA_T_ARRAY: 76 case LUA_T_ARRAY:
@@ -89,7 +89,7 @@ Bool lua_equalObj (Object *t1, Object *t2)
89 case LUA_T_NUMBER: return nvalue(t1) == nvalue(t2); 89 case LUA_T_NUMBER: return nvalue(t1) == nvalue(t2);
90 case LUA_T_STRING: return streq(svalue(t1), svalue(t2)); 90 case LUA_T_STRING: return streq(svalue(t1), svalue(t2));
91 case LUA_T_ARRAY: return avalue(t1) == avalue(t2); 91 case LUA_T_ARRAY: return avalue(t1) == avalue(t2);
92 case LUA_T_FUNCTION: return bvalue(t1) == bvalue(t2); 92 case LUA_T_FUNCTION: return t1->value.tf == t2->value.tf;
93 case LUA_T_CFUNCTION: return fvalue(t1) == fvalue(t2); 93 case LUA_T_CFUNCTION: return fvalue(t1) == fvalue(t2);
94 default: return uvalue(t1) == uvalue(t2); 94 default: return uvalue(t1) == uvalue(t2);
95 } 95 }