diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-08-05 21:46:08 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-08-05 21:46:08 -0700 |
commit | 2e0acd6057bd65b0b872356c51c1b7b1a06c89b9 (patch) | |
tree | a4483a81092a80fda41c624165586371d32a4dce /rand.c | |
parent | 2844bb73b485450660d70de2de489590d0995d9e (diff) | |
download | txr-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