diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2013-10-27 12:53:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2013-10-27 12:53:34 -0700 |
commit | 0ec17325b3ee76e7fa558aaf8c6727a25bbda3ab (patch) | |
tree | 736ae6b65a4854348c26686138c407997323da30 /ChangeLog | |
parent | c70dbaf80f282c751c15c92f4d06787769a3082c (diff) | |
download | txr-0ec17325b3ee76e7fa558aaf8c6727a25bbda3ab.tar.gz txr-0ec17325b3ee76e7fa558aaf8c6727a25bbda3ab.tar.bz2 txr-0ec17325b3ee76e7fa558aaf8c6727a25bbda3ab.zip |
Fix jaw-dropping bug introduced on 2009-11-15, first affecting
the 022 release.
Efficient string literal objects (tag bits 11) were introduced on that
day.
The null_string object was changed to a literal, and that object is
efficiently returned by some string manipulation functions in cases
when it is obvious that the result is an empty string.
However, the LIT type code was not added to a switch statement in
the variable matching code, which continued to recognize only the
type STR as a string, to this day.
A test case for this is
echo ":x" | ./txr -c "@x:@x" -
which results in an "unsupported object in spec" error.
* match.c (h_var): Use stringp to test for string rather than
type(..) == STR. Add LIT and LSTR to the switch statement
so that literals an lazy strings are handled if they occur.
(do_output_line): Add LIT and LSTR to switch.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -1,5 +1,32 @@ 2013-10-27 Kaz Kylheku <kaz@kylheku.com> + Fix jaw-dropping bug introduced on 2009-11-15, first affecting + the 022 release. + + Efficient string literal objects (tag bits 11) were introduced on that + day. + + The null_string object was changed to a literal, and that object is + efficiently returned by some string manipulation functions in cases + when it is obvious that the result is an empty string. + + However, the LIT type code was not added to a switch statement in + the variable matching code, which continued to recognize only the + type STR as a string, to this day. + + A test case for this is + + echo ":x" | ./txr -c "@x:@x" - + + which results in an "unsupported object in spec" error. + + * match.c (h_var): Use stringp to test for string rather than + type(..) == STR. Add LIT and LSTR to the switch statement + so that literals an lazy strings are handled if they occur. + (do_output_line): Add LIT and LSTR to switch. + +2013-10-27 Kaz Kylheku <kaz@kylheku.com> + * genvim.txr: Include syntactic directives which aren't extracted from sources because actions aren't registered for them. |