summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-13 06:31:27 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-13 06:31:27 -0800
commit56674600e24dec13c98bed4b2957ab7d2ceafe73 (patch)
tree5f2ba5562ae2ed4dfc8e9494d902cac1d1723a01
parentdaa4dc223b14e8a73fbf21607e56fae854a2a9cc (diff)
downloadtxr-56674600e24dec13c98bed4b2957ab7d2ceafe73.tar.gz
txr-56674600e24dec13c98bed4b2957ab7d2ceafe73.tar.bz2
txr-56674600e24dec13c98bed4b2957ab7d2ceafe73.zip
num: reduce duplicate code.
* lib.c (num): Use num_fast instead of an expression that is identical to the body of that inline function.
-rw-r--r--lib.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib.c b/lib.c
index e837939b..8697fdc0 100644
--- a/lib.c
+++ b/lib.c
@@ -3173,9 +3173,7 @@ val improper_plist_to_alist(val list, val boolean_keys)
val num(cnum n)
{
- if (n >= NUM_MIN && n <= NUM_MAX)
- return coerce(val, (n << TAG_SHIFT) | TAG_NUM);
- return bignum(n);
+ return (n >= NUM_MIN && n <= NUM_MAX) ? num_fast(n) : bignum(n);
}
cnum c_num(val n)