]> git.eshelyaron.com Git - emacs.git/commitdiff
(sxhash): As far as possible, merge calculation of
authorEli Zaretskii <eliz@gnu.org>
Sat, 6 Nov 2004 17:01:27 +0000 (17:01 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 6 Nov 2004 17:01:27 +0000 (17:01 +0000)
hash code for symbols and strings.

src/fns.c

index b366cab196af6e2f86f1ba6b938803ed08d82c28..e0167ebf990747839a3c29ed377cd6c9ba90a64d 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -5007,15 +5007,14 @@ sxhash (obj, depth)
       hash = XUINT (obj);
       break;
 
-    case Lisp_Symbol:
-      hash = sxhash_string (SDATA (SYMBOL_NAME (obj)),
-                           SCHARS (SYMBOL_NAME (obj)));
-      break;
-
     case Lisp_Misc:
       hash = XUINT (obj);
       break;
 
+    case Lisp_Symbol:
+      obj = SYMBOL_NAME (obj);
+      /* Fall through.  */
+
     case Lisp_String:
       hash = sxhash_string (SDATA (obj), SCHARS (obj));
       break;