From 32bfb2d565e0ee6d23291895310ea66b146b4de8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 6 Nov 2004 17:01:27 +0000 Subject: [PATCH] (sxhash): As far as possible, merge calculation of hash code for symbols and strings. --- src/fns.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/fns.c b/src/fns.c index b366cab196a..e0167ebf990 100644 --- 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; -- 2.39.5