aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorAndreas Schwab <[email protected]>2009-10-24 16:32:06 +0000
committerAndreas Schwab <[email protected]>2009-10-24 16:32:06 +0000
commit987c93276e7a43944cdaef61f7b2aa8fbf7f4d87 (patch)
tree8a9b9fc3754b79f9a266a3b6131b5a5b66fdb460 /src/lisp.h
parent10d66ec001d9292656cdebcc1e944eac403712dc (diff)
(FIXNUM_OVERFLOW_P): Fix last change to handle unsigned
types again.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 3838aff753..6444aac84d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -486,11 +486,13 @@ extern size_t pure_size;
I.e. (x & INTMASK) == XUINT (make_number (x)). */
#define INTMASK ((((EMACS_INT) 1) << VALBITS) - 1)
-/* Value is non-zero if I doesn't fit into a Lisp fixnum. */
+/* Value is non-zero if I doesn't fit into a Lisp fixnum. It is
+ written this way so that it also works if I is of unsigned
+ type. */
#define FIXNUM_OVERFLOW_P(i) \
((i) > MOST_POSITIVE_FIXNUM \
- || (i) < MOST_NEGATIVE_FIXNUM)
+ || ((i) < 0 && (i) < MOST_NEGATIVE_FIXNUM))
/* Extract a value or address from a Lisp_Object. */