Strengthen or weaken only interned symbols. Ignore uninterned ones.
authorTaylor R Campbell <campbell@mumble.net>
Mon, 12 Jul 2010 15:40:16 +0000 (15:40 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Mon, 12 Jul 2010 15:40:16 +0000 (15:40 +0000)
src/microcode/intern.c

index f57c5f0455a3a78f11535f95702d9f25a56f7972..062ed1cc3f21955be519e414efcc24f7056a6121 100644 (file)
@@ -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)))));