changeset 57988:75429b9aa2f2

(sxhash): As far as possible, merge calculation of hash code for symbols and strings.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 06 Nov 2004 17:01:27 +0000
parents db8c9a3a77cd
children 2f160b3f3283
files src/fns.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Sat Nov 06 17:00:37 2004 +0000
+++ b/src/fns.c	Sat Nov 06 17:01:27 2004 +0000
@@ -5007,15 +5007,14 @@
       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;