diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index e7de504f464..2080cf6b4e2 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -387,6 +387,10 @@ extern size_t pure_size; | |||
| 387 | #define make_number(N) \ | 387 | #define make_number(N) \ |
| 388 | ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) | 388 | ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) |
| 389 | 389 | ||
| 390 | #define make_fixnum(x) make_number (x) | ||
| 391 | #define MOST_NEGATIVE_FIXNUM ((EMACS_INT) 1 << (VALBITS - 1)) | ||
| 392 | #define MOST_POSITIVE_FIXNUM (MOST_NEGATIVE_FIXNUM - 1) | ||
| 393 | |||
| 390 | /* During garbage collection, XGCTYPE must be used for extracting types | 394 | /* During garbage collection, XGCTYPE must be used for extracting types |
| 391 | so that the mark bit is ignored. XMARKBIT accesses the markbit. | 395 | so that the mark bit is ignored. XMARKBIT accesses the markbit. |
| 392 | Markbits are used only in particular slots of particular structure types. | 396 | Markbits are used only in particular slots of particular structure types. |
| @@ -468,6 +472,16 @@ extern Lisp_Object make_number (); | |||
| 468 | 472 | ||
| 469 | #endif /* NO_UNION_TYPE */ | 473 | #endif /* NO_UNION_TYPE */ |
| 470 | 474 | ||
| 475 | /* Largest and smallest representable fixnum values. */ | ||
| 476 | |||
| 477 | #define MOST_NEGATIVE_FIXNUM ((EMACS_INT) 1 << (VALBITS - 1)) | ||
| 478 | #define MOST_POSITIVE_FIXNUM (MOST_NEGATIVE_FIXNUM - 1) | ||
| 479 | |||
| 480 | /* Value is non-zero if C integer I doesn't fit into a Lisp fixnum. */ | ||
| 481 | |||
| 482 | #define FIXNUM_OVERFLOW_P(i) \ | ||
| 483 | ((i) > MOST_POSITIVE_FIXNUM || (i) < MOST_NEGATIVE_FIXNUM) | ||
| 484 | |||
| 471 | /* Extract a value or address from a Lisp_Object. */ | 485 | /* Extract a value or address from a Lisp_Object. */ |
| 472 | 486 | ||
| 473 | #define XCONS(a) (eassert (GC_CONSP(a)),(struct Lisp_Cons *) XPNTR(a)) | 487 | #define XCONS(a) (eassert (GC_CONSP(a)),(struct Lisp_Cons *) XPNTR(a)) |