diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | match.c | 8 |
2 files changed, 13 insertions, 7 deletions
@@ -1,6 +1,16 @@ 2009-11-18 Kaz Kylheku <kkylheku@gmail.com> - parser.l (yyerror): Total breakage: can't take auto_str of char * + * match.c (match_line, match_files): Fix broken behavior of collect + that doesn't match anything. It is not a failed match, as the + documentation makes perfectly clear. Collect/coll were introduced + in txr-006 and had the proper non-failing semantics. + However, in txr-015, during code restructuring, a bug crept in. + When changing to a different debugiging function, for some reason + I added the nil returns. + +2009-11-18 Kaz Kylheku <kkylheku@gmail.com> + + * parser.l (yyerror): Total breakage: can't take auto_str of char * string. (yyerrorf): Total breakage: arguments of wrong types. Detected by vformat as garbage. @@ -471,10 +471,8 @@ obj_t *match_line(obj_t *bindings, obj_t *specline, obj_t *dataline, } - if (!bindings_coll) { + if (!bindings_coll) debuglf(spec_lineno, lit("nothing was collected"), nao); - return nil; - } for (iter = bindings_coll; iter; iter = cdr(iter)) { obj_t *pair = car(iter); @@ -1289,10 +1287,8 @@ repeat_spec_same_data: return nil; } - if (!bindings_coll) { + if (!bindings_coll) debuglf(spec_linenum, lit("nothing was collected"), nao); - return nil; - } for (iter = bindings_coll; iter; iter = cdr(iter)) { obj_t *pair = car(iter); |