summaryrefslogtreecommitdiff
path: root/lisp/hash.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:12 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:12 +0000
commit10dc4a2c37597e02c12a9df3e9dba02a73bfc11b (patch)
tree862068307dff135870c4ae58be677408c4942a39 /lisp/hash.c
parent8ae60bfe8a4b233100f5128859c76239e5789f70 (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
Diffstat (limited to 'lisp/hash.c')
-rw-r--r--lisp/hash.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/hash.c b/lisp/hash.c
index 3d32f07..98e8ac9 100644
--- a/lisp/hash.c
+++ b/lisp/hash.c
@@ -27,9 +27,9 @@
* Author: Paulo César Pereira de Andrade
*/
-/* $XFree86: xc/programs/xedit/lisp/hash.c,v 1.4 2002/11/23 08:26:48 paulo Exp $ */
+/* $XFree86: xc/programs/xedit/lisp/hash.c,v 1.6 2003/09/17 22:28:08 paulo Exp $ */
-#include "hash.h"
+#include "lisp/hash.h"
/* A simple hash-table implementation
* TODO: implement SXHASH and WITH-HASH-TABLE-ITERATOR
@@ -324,10 +324,12 @@ LispRehash(LispHashTable *hash)
if ((nentry->count % 4) == 0) {
LispObj **keys, **values;
- keys = realloc(nentry->keys, sizeof(LispObj*) * (i + 4));
+ keys = realloc(nentry->keys, sizeof(LispObj*) *
+ (nentry->count + 4));
if (keys == NULL)
goto out_of_memory;
- values = realloc(nentry->values, sizeof(LispObj*) * (i + 4));
+ values = realloc(nentry->values, sizeof(LispObj*) *
+ (nentry->count + 4));
if (values == NULL) {
free(keys);
goto out_of_memory;
@@ -529,6 +531,8 @@ Lisp_MakeHashTable(LispBuiltin *builtin)
test = ARGUMENT(0);
if (test != UNSPEC) {
+ if (FUNCTIONP(test))
+ test = test->data.atom->object;
if (test == Oeq)
function = FEQ;
else if (test == Oeql)