summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-14 11:05:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-14 11:05:53 -0800
commit2d5abf90c05d37608ca41d0c3457c1159061dd91 (patch)
treeaef5bc2117d2ff2a2eec53d0afbec835c2d72e76
parent02d5a8ff16d1aa82fab7b861788886c08e81f268 (diff)
downloadtxr-2d5abf90c05d37608ca41d0c3457c1159061dd91.tar.gz
txr-2d5abf90c05d37608ca41d0c3457c1159061dd91.tar.bz2
txr-2d5abf90c05d37608ca41d0c3457c1159061dd91.zip
* arith.c (minus): Allow difference between characters.
-rw-r--r--ChangeLog4
-rw-r--r--arith.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d2bc23b1..7d95ab54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-12-14 Kaz Kylheku <kaz@kylheku.com>
+ * arith.c (minus): Allow difference between characters.
+
+2011-12-14 Kaz Kylheku <kaz@kylheku.com>
+
* arith.c (plus, minus, gt, lt, ge, le): Handle character operands.
* eval.c (eval_init): New functions interned.
diff --git a/arith.c b/arith.c
index 79fb26d0..ccc29657 100644
--- a/arith.c
+++ b/arith.c
@@ -360,6 +360,7 @@ val minus(val anum, val bnum)
switch (TAG_PAIR(tag_a, tag_b)) {
case TAG_PAIR(TAG_NUM, TAG_NUM):
+ case TAG_PAIR(TAG_CHR, TAG_CHR):
{
cnum a = c_num(anum);
cnum b = c_num(bnum);