diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-07-10 07:10:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-07-10 07:10:32 -0700 |
commit | 61100e52b5c23df1087e0ecf9233e1ffc2f016ab (patch) | |
tree | cb493a43a67395d0a8c5390305548eb2723d7661 | |
parent | 54d43f3260baaad25f5598ff876799711fe109ea (diff) | |
download | txr-61100e52b5c23df1087e0ecf9233e1ffc2f016ab.tar.gz txr-61100e52b5c23df1087e0ecf9233e1ffc2f016ab.tar.bz2 txr-61100e52b5c23df1087e0ecf9233e1ffc2f016ab.zip |
Fix unget-byte and unget-char on catenated streams.
* stream.c (cat_unget_byte, cat_unget_char): Recursive
call to unget_byte and unget_char with reversed arguments.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | stream.c | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2015-07-10 Kaz Kylheku <kaz@kylheku.com> + + Fix unget-byte and unget-char on catenated streams. + + * stream.c (cat_unget_byte, cat_unget_char): Recursive + call to unget_byte and unget_char with reversed arguments. + 2015-07-09 Kaz Kylheku <kaz@kylheku.com> Parser cleanup: embed scanner in parser. @@ -2896,7 +2896,7 @@ static val cat_unget_byte(val stream, int byte) stream, nao); } else { val stream = car(streams); - return unget_byte(stream, num_fast(byte)); + return unget_byte(num_fast(byte), stream); } return nil; @@ -2912,7 +2912,7 @@ static val cat_unget_char(val stream, val ch) stream, nao); } else { val stream = car(streams); - return unget_char(stream, ch); + return unget_char(ch, stream ); } } |