changeset 9943:4e6e0478baef

(NATNUMP): New macro. (CHECK_NATNUM): Use that macro instead of its expansion.
author Karl Heuer <kwzh@gnu.org>
date Tue, 15 Nov 1994 22:45:31 +0000
parents c189487b08dd
children dd9afae74baf
files src/lisp.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lisp.h	Tue Nov 15 21:44:10 1994 +0000
+++ b/src/lisp.h	Tue Nov 15 22:45:31 1994 +0000
@@ -748,6 +748,7 @@
 #else
 #define NUMBERP(x) (INTEGERP (x))
 #endif
+#define NATNUMP(x) (INTEGERP (x) && XINT (x) >= 0)
 
 #define INTEGERP(x) (XTYPE ((x)) == Lisp_Int)
 #define SYMBOLP(x) (XTYPE ((x)) == Lisp_Symbol)
@@ -829,8 +830,7 @@
   do { if (!INTEGERP ((x))) x = wrong_type_argument (Qintegerp, (x)); } while (0)
 
 #define CHECK_NATNUM(x, i) \
-  do { if (!INTEGERP ((x)) || XINT ((x)) < 0)	\
-      x = wrong_type_argument (Qwholenump, (x)); } while (0)
+  do { if (!NATNUMP (x)) x = wrong_type_argument (Qwholenump, (x)); } while (0)
 
 #define CHECK_MARKER(x, i) \
   do { if (!MARKERP ((x))) x = wrong_type_argument (Qmarkerp, (x)); } while (0)