From 1f8fdd64e569da2fd199b1812d85e4f2e6e99693 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 12 Jul 2010 15:40:16 +0000 Subject: [PATCH] Strengthen or weaken only interned symbols. Ignore uninterned ones. --- src/microcode/intern.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/microcode/intern.c b/src/microcode/intern.c index f57c5f045..062ed1cc3 100644 --- a/src/microcode/intern.c +++ b/src/microcode/intern.c @@ -82,11 +82,18 @@ find_symbol_internal (unsigned long length, const char * string) static void replace_symbol_bucket_type (SCHEME_OBJECT symbol, unsigned int type) { - SCHEME_OBJECT obarray = (VECTOR_REF (fixed_objects, OBARRAY)); - SCHEME_OBJECT string = (MEMORY_REF (symbol, SYMBOL_NAME)); - long length = (STRING_LENGTH (string)); - const char *char_pointer = (STRING_POINTER (string)); - SCHEME_OBJECT *bucket + SCHEME_OBJECT obarray, string, *bucket; + long length; + const char *char_pointer; + + if (UNINTERNED_SYMBOL_P (symbol)) return; + assert (INTERNED_SYMBOL_P (symbol)); + + obarray = (VECTOR_REF (fixed_objects, OBARRAY)); + string = (MEMORY_REF (symbol, SYMBOL_NAME)); + length = (STRING_LENGTH (string)); + char_pointer = (STRING_POINTER (string)); + bucket = (VECTOR_LOC (obarray, ((string_hash (length, char_pointer)) % (VECTOR_LENGTH (obarray))))); -- 2.25.1