--- cvsroot/microscheme/scheme.c 2015/11/28 10:56:45 1.32 +++ cvsroot/microscheme/scheme.c 2015/11/28 10:59:14 1.33 @@ -1083,7 +1083,17 @@ #ifndef USE_OBJECT_LIST -static int hash_fn (const char *key, int table_size); +static int +hash_fn (const char *key, int table_size) +{ + const unsigned char *p = key; + uint32_t hash = 2166136261; + + while (*p) + hash = (hash ^ *p++) * 16777619; + + return hash % table_size; +} static pointer oblist_initial_value (SCHEME_P) @@ -2813,21 +2823,6 @@ /* ========== Environment implementation ========== */ -#if !defined(USE_ALIST_ENV) || !defined(USE_OBJECT_LIST) - -static int -hash_fn (const char *key, int table_size) -{ - const unsigned char *p = key; - uint32_t hash = 2166136261; - - while (*p) - hash = (hash ^ *p++) * 16777619; - - return hash % table_size; -} -#endif - #ifndef USE_ALIST_ENV /* @@ -2859,7 +2854,7 @@ uintptr_t ptr = (uintptr_t)sym; #if 0 - /* tqable size is prime, so why mix */ + /* table size is prime, so why mix */ ptr += ptr >> 32; ptr += ptr >> 16; ptr += ptr >> 8;