]> code.delx.au - gnu-emacs/blobdiff - src/lisp.h
Merge from emacs-23.
[gnu-emacs] / src / lisp.h
index 64c0b2332e372213c44eb92936d66d6412ebe25a..c5c047a53cb0bcf1ed70ab726497bcb9875268b5 100644 (file)
@@ -444,7 +444,13 @@ enum pvec_type
    ((var) = ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \
             + ((EMACS_INT) (ptr) & VALMASK)))
 
+#ifdef DATA_SEG_BITS
+/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers
+   which were stored in a Lisp_Object */
+#define XPNTR(a) ((EMACS_UINT) (((a) & VALMASK) | DATA_SEG_BITS))
+#else
 #define XPNTR(a) ((EMACS_UINT) ((a) & VALMASK))
+#endif
 
 #endif /* not USE_LSB_TAG */
 
@@ -482,6 +488,14 @@ enum pvec_type
 # define XSET(var, vartype, ptr) \
    (((var).s.val = ((EMACS_INT) (ptr))), ((var).s.type = ((char) (vartype))))
 
+#ifdef DATA_SEG_BITS
+/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers
+   which were stored in a Lisp_Object */
+#define XPNTR(a) (XUINT (a) | DATA_SEG_BITS)
+#else
+#define XPNTR(a) ((EMACS_INT) XUINT (a))
+#endif
+
 #endif /* !USE_LSB_TAG */
 
 #if __GNUC__ >= 2 && defined (__OPTIMIZE__)
@@ -503,23 +517,6 @@ extern Lisp_Object make_number (EMACS_INT);
 
 #define EQ(x, y) (XHASH (x) == XHASH (y))
 
-#ifndef XPNTR
-#ifdef DATA_SEG_BITS
-/* This case is used for the rt-pc.
-   In the diffs I was given, it checked for ptr = 0
-   and did not adjust it in that case.
-   But I don't think that zero should ever be found
-   in a Lisp object whose data type says it points to something.  */
-#define XPNTR(a) (XUINT (a) | DATA_SEG_BITS)
-#else
-/* Some versions of gcc seem to consider the bitfield width when
-   issuing the "cast to pointer from integer of different size"
-   warning, so the cast is here to widen the value back to its natural
-   size.  */
-#define XPNTR(a) ((EMACS_INT) XUINT (a))
-#endif
-#endif /* no XPNTR */
-
 /* Largest and smallest representable fixnum values.  These are the C
    values.  */