summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-11-24 20:26:52 -0800
committerKaz Kylheku <kaz@kylheku.com>2013-11-24 20:26:52 -0800
commita56501891dcf01d4f68ab560eb24fa3406afe0e1 (patch)
tree2570cbeccb7cb5e691dc6b2204a64e1d3b4721e7
parent12294e5105632d1e009679f1bb2e48df19a5799b (diff)
downloadtxr-a56501891dcf01d4f68ab560eb24fa3406afe0e1.tar.gz
txr-a56501891dcf01d4f68ab560eb24fa3406afe0e1.tar.bz2
txr-a56501891dcf01d4f68ab560eb24fa3406afe0e1.zip
* match.c (v_load): Bugfix: bindings were propagated in only one of two
subcases of a successful load. This bug means that a loaded TXR sub-query was not reliably able to bind variables that are then visible to subsquent directives in the parent.
-rw-r--r--ChangeLog7
-rw-r--r--match.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 354fcd5c..3ec3bb4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2013-11-24 Kaz Kylheku <kaz@kylheku.com>
+ * match.c (v_load): Bugfix: bindings were propagated in only one of two
+ subcases of a successful load. This bug means that a loaded TXR
+ sub-query was not reliably able to bind variables that are then visible
+ to subsquent directives in the parent.
+
+2013-11-24 Kaz Kylheku <kaz@kylheku.com>
+
Fix for uninitialized struct member curfiles in the match context.
This is used for reporting the current match location in debug traces.
diff --git a/match.c b/match.c
index f4d01d08..c8517201 100644
--- a/match.c
+++ b/match.c
@@ -3597,6 +3597,8 @@ static val v_load(match_files_ctx *c)
} else {
cons_bind (new_bindings, success, result);
+ c->bindings = new_bindings;
+
if (consp(success)) {
debuglf(specline,
lit("load: ~s matched; "
@@ -3604,7 +3606,6 @@ static val v_load(match_files_ctx *c)
path, c->data_lineno, cdr(success), nao);
c->data = car(success);
c->data_lineno = cdr(success);
- c->bindings = new_bindings;
} else {
debuglf(specline, lit("load: ~s consumed entire file"), path,
nao);