summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-10-11 15:37:13 +0000
committerGerd Moellmann <gerd@gnu.org>2001-10-11 15:37:13 +0000
commit53ede3f4d857d792ca8e178f5b9170b843df1c1b (patch)
treed558f1e224d5f13d0af0c93ad44e752ca15a44bd /src
parentd731e6b8b30d34849e728f2252d8b5773ae83963 (diff)
downloademacs-53ede3f4d857d792ca8e178f5b9170b843df1c1b.tar.gz
(make_fixnum_or_float): New macro.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 818b6e1163f..e51f2f64e56 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3086,3 +3086,9 @@ extern Lisp_Object Vdirectory_sep_char;
#endif
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
+
+/* Return a fixnum or float, depending on whether VAL fits in a Lisp
+ fixnum. */
+
+#define make_fixnum_or_float(val) \
+ (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val))