aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2004-04-21 22:41:53 +0000
committerStefan Monnier2004-04-21 22:41:53 +0000
commite0a583f84a0bd4825952424bb8ab2ad93c7194d7 (patch)
tree7d343fcbdade64ccbb0f4f0f3be6ce8c37333fc5 /src
parentf71d34b0a8cec575e8aa1727e2579e2afd00a0e4 (diff)
downloademacs-e0a583f84a0bd4825952424bb8ab2ad93c7194d7.tar.gz
emacs-e0a583f84a0bd4825952424bb8ab2ad93c7194d7.zip
(XINT) [EXPLICIT_SIGN_EXTEND && !NO_UNION_TYPE]:
Don't make assumptions about the relative place of i and val. (EQ) [!NO_UNION_TYPE]: Don't forget to check the type match as well.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 265d3c29273..aa1e0cb8e40 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -382,7 +382,7 @@ enum pvec_type
382 382
383#ifdef EXPLICIT_SIGN_EXTEND 383#ifdef EXPLICIT_SIGN_EXTEND
384/* Make sure we sign-extend; compilers have been known to fail to do so. */ 384/* Make sure we sign-extend; compilers have been known to fail to do so. */
385#define XINT(a) (((a).i << (BITS_PER_EMACS_INT - VALBITS)) \ 385#define XINT(a) (((a).s.val << (BITS_PER_EMACS_INT - VALBITS)) \
386 >> (BITS_PER_EMACS_INT - VALBITS)) 386 >> (BITS_PER_EMACS_INT - VALBITS))
387#else 387#else
388#define XINT(a) ((a).s.val) 388#define XINT(a) ((a).s.val)
@@ -400,7 +400,7 @@ enum pvec_type
400extern Lisp_Object make_number (); 400extern Lisp_Object make_number ();
401#endif 401#endif
402 402
403#define EQ(x, y) ((x).s.val == (y).s.val) 403#define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type)
404 404
405#endif /* NO_UNION_TYPE */ 405#endif /* NO_UNION_TYPE */
406 406