Commit 74e49b38 authored by Ken Raeburn's avatar Ken Raeburn
Browse files

* 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.
parent 7c752c80
No preview for this file type
......@@ -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; }))
extern Lisp_Object make_number ();
/* During garbage collection, XGCTYPE must be used for extracting types
so that the mark bit is ignored. XMARKBIT access the markbit.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment