summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-09-16 22:46:14 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-09-16 22:46:14 -0700
commitcce735e189bfcfd4a211fd856bc1850dce9b9d8c (patch)
tree65a9d2862ef61606e592fe9c516efc70b2d0e340 /eval.c
parent20a8ba5e5d546d8962802447d40636ec0cf299c8 (diff)
downloadtxr-cce735e189bfcfd4a211fd856bc1850dce9b9d8c.tar.gz
txr-cce735e189bfcfd4a211fd856bc1850dce9b9d8c.tar.bz2
txr-cce735e189bfcfd4a211fd856bc1850dce9b9d8c.zip
* arith.c (logand, logior, logxor): Bugfix: result needs to be
normalized, otherwise we end up with fixnum-range bignums. (comp_clamp): New function. (logcomp): Changed to two argument form. If second argument is present (not nil) then call comp_clamp. * eval.c (eval_init): Change registration of logcomp to allow optional argument. * lib.h (logcomp): Declaration updated. * mpi-patches/add-bitops: New mp_clamp_comp function implemented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index e075555d..4050a2ea 100644
--- a/eval.c
+++ b/eval.c
@@ -2234,7 +2234,7 @@ void eval_init(void)
reg_fun(intern(lit("logand"), user_package), func_n2(logand));
reg_fun(intern(lit("logior"), user_package), func_n2(logior));
reg_fun(intern(lit("logxor"), user_package), func_n2(logxor));
- reg_fun(intern(lit("logcomp"), user_package), func_n1(logcomp));
+ reg_fun(intern(lit("logcomp"), user_package), func_n2o(logcomp, 1));
reg_fun(intern(lit("regex-compile"), user_package), func_n1(regex_compile));
reg_fun(intern(lit("regexp"), user_package), func_n1(regexp));