diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-04-29 19:39:45 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-04-29 19:39:45 -0700 |
commit | d428a0e222590c1eb20c7abdf2905ff0ebddc69a (patch) | |
tree | 3ad3f6ccdd72adfce748124e1b5026b96f92d080 | |
parent | 7a0851c446dc6d128b1c49e21cc9d356bd7debc3 (diff) | |
download | txr-d428a0e222590c1eb20c7abdf2905ff0ebddc69a.tar.gz txr-d428a0e222590c1eb20c7abdf2905ff0ebddc69a.tar.bz2 txr-d428a0e222590c1eb20c7abdf2905ff0ebddc69a.zip |
Bugfix: cannot print (lambda . 42) structure.
* lib.c (obj_print, obj_pprint): Fix mistake in the test for
properly formed lambda syntax whcih is printed specially.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib.c | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2015-04-29 Kaz Kylheku <kaz@kylheku.com> + + Bugfix: cannot print (lambda . 42) structure. + + * lib.c (obj_print, obj_pprint): Fix mistake in the test for + properly formed lambda syntax whcih is printed specially. + 2015-04-28 Kaz Kylheku <kaz@kylheku.com> Adding poll function. @@ -6734,7 +6734,7 @@ val obj_print(val obj, val out) put_char(chr('('), out); } - if (sym == lambda_s && cdr(obj) && symbolp(second(obj))) { + if (sym == lambda_s && consp(cdr(obj)) && symbolp(second(obj))) { obj_print(sym, out); if (second(obj)) { put_string(lit(" (. "), out); @@ -6928,7 +6928,7 @@ val obj_pprint(val obj, val out) put_char(chr('('), out); } - if (sym == lambda_s && cdr(obj) && symbolp(second(obj))) { + if (sym == lambda_s && consp(cdr(obj)) && symbolp(second(obj))) { obj_print(sym, out); if (second(obj)) { put_string(lit(" (. "), out); |