[PATCH 2/2] Don't consider a vcc expr to be constant after vcc_expr_tostring.
Martin Blix Grydeland
martin at varnish-software.com
Tue May 8 14:24:48 CEST 2012
Avoids vcc errors from constructs like "std.log("Test: " + 1);"
---
lib/libvcl/vcc_expr.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c
index 30e63d9..19a455c 100644
--- a/lib/libvcl/vcc_expr.c
+++ b/lib/libvcl/vcc_expr.c
@@ -434,8 +434,10 @@ vcc_expr_tostring(struct expr **e, enum var_type fmt)
case TIME: p = "VRT_time_string(sp, \v1)"; break;
default: break;
}
- if (p != NULL)
+ if (p != NULL) {
*e = vcc_expr_edit(fmt, p, *e, NULL);
+ (*e)->constant = 0;
+ }
}
/*--------------------------------------------------------------------
--
1.7.4.1
More information about the varnish-dev
mailing list