changeset 28508:a68042252425

* lisp.h (make_number) [!NO_UNION_TYPE && __GNUC__ >= 2 && __OPTIMIZE__]: Provide a GNU C macro version that handles lisp-object unions. (XSET) [!NO_UNION_TYPE]: Set the value field first, then the type field, to better cope with ENABLE_CHECKING and calls that modify a Lisp_Object using its old value.
author Ken Raeburn <raeburn@raeburn.org>
date Wed, 05 Apr 2000 18:47:29 +0000
parents b6f06a755c7d
children 022a7fd54bfe
files src/ChangeLog src/lisp.h
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
Binary file src/ChangeLog has changed
--- a/src/lisp.h	Wed Apr 05 17:29:31 2000 +0000
+++ b/src/lisp.h	Wed Apr 05 18:47:29 2000 +0000
@@ -424,9 +424,14 @@
 #define XPNTR(a) ((a).u.val)
 
 #define XSET(var, vartype, ptr) \
-   (((var).s.type = ((char) (vartype))), ((var).s.val = ((int) (ptr))))
-
+   (((var).s.val = ((int) (ptr))), ((var).s.type = ((char) (vartype))))
+
+#if __GNUC__ >= 2 && defined (__OPTIMIZE__)
+#define make_number(N) \
+  (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; }))
+#else
 extern Lisp_Object make_number ();
+#endif
 
 /* During garbage collection, XGCTYPE must be used for extracting types
  so that the mark bit is ignored.  XMARKBIT access the markbit.