From: Taylor R Campbell Date: Mon, 12 Jul 2010 15:40:16 +0000 (+0000) Subject: Strengthen or weaken only interned symbols. Ignore uninterned ones. X-Git-Tag: 20101212-Gtk~145^2~2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1f8fdd64e569da2fd199b1812d85e4f2e6e99693;p=mit-scheme.git Strengthen or weaken only interned symbols. Ignore uninterned ones. --- 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)))));