summaryrefslogtreecommitdiffstats
path: root/rand.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-08-05 21:46:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-08-05 21:46:08 -0700
commit2e0acd6057bd65b0b872356c51c1b7b1a06c89b9 (patch)
treea4483a81092a80fda41c624165586371d32a4dce /rand.c
parent2844bb73b485450660d70de2de489590d0995d9e (diff)
downloadtxr-2e0acd6057bd65b0b872356c51c1b7b1a06c89b9.tar.gz
txr-2e0acd6057bd65b0b872356c51c1b7b1a06c89b9.tar.bz2
txr-2e0acd6057bd65b0b872356c51c1b7b1a06c89b9.zip
bugfix: n-ary arith functions must check single arg.
We are allowing calls like (* "a") and (+ "a") without diagnosing that the argument isn't of a valid type. Note that (max "a") is fine beacause min and max use the less function; they are not strictly numeric. * lib.c (nary_op): Beef up function with additional argument for type checking the unary case. (unary_num, unary_arith, unary_int): New static functions. (plusv, mulv, logandv, logiorv): Use new nary_op interface. (gtv, ltv, gev, lev, numeqv, numneq): Check the first number. * lib.c (nary_op): Declaration updated.
Diffstat (limited to 'rand.c')
0 files changed, 0 insertions, 0 deletions