aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorKen Raeburn <[email protected]>2000-04-05 18:47:29 +0000
committerKen Raeburn <[email protected]>2000-04-05 18:47:29 +0000
commit74e49b38a8438c25b5f96cbc16be8001c706a484 (patch)
tree285254b654bf079cc637418083a2defbffbdc198 /src/lisp.h
parent7c752c8099915f10ec6e99d60ea20196111a94a1 (diff)
* 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.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 52a9f9b78b..e6b91f6db6 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -424,9 +424,14 @@ extern int pure_size;
#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.