# HG changeset patch # User Aidan Kehoe # Date 1261070972 0 # Node ID fd98353950a4ab55f638bbc91b0dc878e2097ce4 # Parent 0081fd36b78316a90f7f6d36eed16abb304d4e51 Make my last change to elhash.c more kosher, comparing pointers not ints 2009-12-17 Aidan Kehoe * elhash.c (HASH_TABLE_DEFAULT_REHASH_THRESHOLD): That last change was wrong in theory though not in practice; we're comparing function pointers, not enumeration values. diff -r 0081fd36b783 -r fd98353950a4 src/ChangeLog --- a/src/ChangeLog Thu Dec 17 14:51:37 2009 +0000 +++ b/src/ChangeLog Thu Dec 17 17:29:32 2009 +0000 @@ -1,3 +1,9 @@ +2009-12-17 Aidan Kehoe + + * elhash.c (HASH_TABLE_DEFAULT_REHASH_THRESHOLD): + That last change was wrong in theory though not in practice; we're + comparing function pointers, not enumeration values. + 2009-12-17 Aidan Kehoe * elhash.c (HASH_TABLE_DEFAULT_REHASH_THRESHOLD): diff -r 0081fd36b783 -r fd98353950a4 src/elhash.c --- a/src/elhash.c Thu Dec 17 14:51:37 2009 +0000 +++ b/src/elhash.c Thu Dec 17 17:29:32 2009 +0000 @@ -118,12 +118,8 @@ #define HASH_TABLE_DEFAULT_SIZE 16 #define HASH_TABLE_DEFAULT_REHASH_SIZE 1.3 #define HASH_TABLE_MIN_SIZE 10 -/* Casts are necessary here for VC++, though they shouldn't be. See - 20a807210912170619nf13bbo8bee77a787961667@mail.gmail.com and the related - thread. */ #define HASH_TABLE_DEFAULT_REHASH_THRESHOLD(size, test_function) \ - ((size) > 4096 && ((int)(test_function)) == (int)(HASH_TABLE_EQ) \ - ? 0.7 : 0.6) + (((size) > 4096 && NULL == (test_function)) ? 0.7 : 0.6) #define HASHCODE(key, ht) \ ((((ht)->hash_function ? (ht)->hash_function (key) : LISP_HASH (key)) \