aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 787457b4872..997ef458ec5 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -227,7 +227,7 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 };
227 227
228/* Lisp integers use 2 tags, to give them one extra bit, thus 228/* Lisp integers use 2 tags, to give them one extra bit, thus
229 extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */ 229 extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */
230static EMACS_INT const INTMASK = EMACS_INT_MAX >> (INTTYPEBITS - 1); 230#define INTMASK (EMACS_INT_MAX >> (INTTYPEBITS - 1))
231#define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 231#define case_Lisp_Int case Lisp_Int0: case Lisp_Int1
232#define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0) 232#define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0)
233 233
@@ -1309,6 +1309,14 @@ sxhash_combine (EMACS_UINT x, EMACS_UINT y)
1309 return (x << 4) + (x >> (BITS_PER_EMACS_INT - 4)) + y; 1309 return (x << 4) + (x >> (BITS_PER_EMACS_INT - 4)) + y;
1310} 1310}
1311 1311
1312/* Hash X, returning a value that fits into a fixnum. */
1313
1314LISP_INLINE EMACS_UINT
1315SXHASH_REDUCE (EMACS_UINT x)
1316{
1317 return (x ^ x >> (BITS_PER_EMACS_INT - FIXNUM_BITS)) & INTMASK;
1318}
1319
1312/* These structures are used for various misc types. */ 1320/* These structures are used for various misc types. */
1313 1321
1314struct Lisp_Misc_Any /* Supertype of all Misc types. */ 1322struct Lisp_Misc_Any /* Supertype of all Misc types. */