changeset 55081:35a889bb25b7

(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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 21 Apr 2004 22:41:53 +0000
parents b8afe141e350
children 807a79513376
files src/lisp.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lisp.h	Wed Apr 21 22:37:16 2004 +0000
+++ b/src/lisp.h	Wed Apr 21 22:41:53 2004 +0000
@@ -382,7 +382,7 @@
 
 #ifdef EXPLICIT_SIGN_EXTEND
 /* Make sure we sign-extend; compilers have been known to fail to do so.  */
-#define XINT(a) (((a).i << (BITS_PER_EMACS_INT - VALBITS)) \
+#define XINT(a) (((a).s.val << (BITS_PER_EMACS_INT - VALBITS)) \
 		 >> (BITS_PER_EMACS_INT - VALBITS))
 #else
 #define XINT(a) ((a).s.val)
@@ -400,7 +400,7 @@
 extern Lisp_Object make_number ();
 #endif
 
-#define EQ(x, y) ((x).s.val == (y).s.val)
+#define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type)
 
 #endif /* NO_UNION_TYPE */