diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-05-10 17:54:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-05-10 17:54:32 -0700 |
commit | 19ec71ba06fb953d9838a930ee5e1522092a8493 (patch) | |
tree | 362fee756ad5ef486d7b8e4f5a909507dac7e5ca /arith.c | |
parent | 12b74f698287f2fb4b5d6b20d02f810d808a45f6 (diff) | |
download | txr-19ec71ba06fb953d9838a930ee5e1522092a8493.tar.gz txr-19ec71ba06fb953d9838a930ee5e1522092a8493.tar.bz2 txr-19ec71ba06fb953d9838a930ee5e1522092a8493.zip |
String type related bugfixes: neglecting to handle all three kinds in
some places. In particular, the test case
echo : | ./txr -c '@a:@a' -
breaks because of neglected LIT in do_match_line.
* arith.c (tofloat, toint): Handle LIT type in switch.
* lib.c (ref, refset, replace, update): Handle LSTR type.
* match.c (do_match_line, do_output_line): Handle LSTR and LIT
objects in switch.
Diffstat (limited to 'arith.c')
-rw-r--r-- | arith.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1945,6 +1945,7 @@ val tofloat(val obj) return obj; case STR: case LSTR: + case LIT: return flo_str(obj); default: break; @@ -1970,6 +1971,7 @@ val toint(val obj, val base) return int_flo(obj); case STR: case LSTR: + case LIT: return int_str(obj, base); default: break; |