summaryrefslogtreecommitdiffstats
path: root/lib.c
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
commitbb5d5d3efed8491ce2159abdf3da2114db91e5eb (patch)
tree5f2ba5562ae2ed4dfc8e9494d902cac1d1723a01 /lib.c
parent5724a053262cc324515206180b6640ecde12addb (diff)
downloadtxr-bb5d5d3efed8491ce2159abdf3da2114db91e5eb.tar.gz
txr-bb5d5d3efed8491ce2159abdf3da2114db91e5eb.tar.bz2
txr-bb5d5d3efed8491ce2159abdf3da2114db91e5eb.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.
Diffstat (limited to 'lib.c')
-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)