# HG changeset patch # User Karl Heuer # Date 781284253 0 # Node ID ec707cca800ae22c4d649b2646d4bacc60783c75 # Parent 51aef3ec59f87d02c4294276501f7caf5f8f221e (XSETFASTINT): New macro. (CHECK_NUMBER_COERCE_MARKER): Don't use XFASTINT as an lvalue. (CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Likewise. diff -r 51aef3ec59f8 -r ec707cca800a src/lisp.h --- a/src/lisp.h Tue Oct 04 14:23:18 1994 +0000 +++ b/src/lisp.h Tue Oct 04 15:24:13 1994 +0000 @@ -313,9 +313,11 @@ #define XSETTYPE(a, b) ((a) = XUINT (a) | ((EMACS_INT)(b) << VALBITS)) #endif -/* Use XFASTINT for fast retrieval and storage of integers known - to be positive. This takes advantage of the fact that Lisp_Int is 0. */ +/* For integers known to be positive, XFASTINT provides fast retrieval + and XSETFASTINT provides fast storage. This takes advantage of the + fact that Lisp_Int is 0. */ #define XFASTINT(a) (a) +#define XSETFASTINT(a, b) ((a) = (b)) /* Extract the value of a Lisp_Object as a signed integer. */ @@ -395,9 +397,11 @@ #define XTYPE(a) ((enum Lisp_Type) (a).u.type) #define XSETTYPE(a, b) ((a).u.type = (char) (b)) -/* Use XFASTINT for fast retrieval and storage of integers known - to be positive. This takes advantage of the fact that Lisp_Int is 0. */ +/* For integers known to be positive, XFASTINT provides fast retrieval + and XSETFASTINT provides fast storage. This takes advantage of the + fact that Lisp_Int is 0. */ #define XFASTINT(a) ((a).i) +#define XSETFASTINT(a, b) ((a).i = (b)) #ifdef EXPLICIT_SIGN_EXTEND /* Make sure we sign-extend; compilers have been known to fail to do so. */ @@ -785,7 +789,7 @@ do { if (!MARKERP ((x))) x = wrong_type_argument (Qmarkerp, (x)); } while (0) #define CHECK_NUMBER_COERCE_MARKER(x, i) \ - do { if (MARKERP ((x))) XFASTINT (x) = marker_position (x); \ + do { if (MARKERP ((x))) XSETFASTINT (x, marker_position (x)); \ else if (!INTEGERP ((x))) x = wrong_type_argument (Qinteger_or_marker_p, (x)); } while (0) #ifdef LISP_FLOAT_TYPE @@ -805,7 +809,7 @@ x = wrong_type_argument (Qnumberp, (x)); } while (0) #define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x, i) \ - do { if (MARKERP (x)) XFASTINT (x) = marker_position (x); \ + do { if (MARKERP (x)) XSETFASTINT (x, marker_position (x)); \ else if (!INTEGERP (x) && !FLOATP (x)) \ x = wrong_type_argument (Qnumber_or_marker_p, (x)); } while (0)