[experimental-ims] b09f55e Fix string documentation for 3.0

Geoff Simmons geoff at varnish-cache.org
Mon Jan 9 21:51:45 CET 2012


commit b09f55ec50e4fcfaa5ee122a39b2a4c31ae3e9cf
Author: Andreas Plesner Jacobsen <apj at mutt.dk>
Date:   Tue Sep 6 19:30:40 2011 +0200

    Fix string documentation for 3.0

diff --git a/doc/sphinx/installation/upgrade.rst b/doc/sphinx/installation/upgrade.rst
index ee57df4..d00e9b0 100644
--- a/doc/sphinx/installation/upgrade.rst
+++ b/doc/sphinx/installation/upgrade.rst
@@ -13,6 +13,10 @@ string concatenation operator
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 String concatenation did not have an operator previously, but this has now been changed to ``+``.
 
+no more %-escapes in strings
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+To simplify strings, the %-encoding has been removed. If you need non-printable characters, you need to use inline C.
+
 ``log`` moved to the std vmod
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 82e20f4..7359e6f 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -39,11 +39,11 @@ In addition to the C-like assignment (=), comparison (==, !=) and
 boolean (!, && and \|\|) operators, VCL supports both regular
 expression and ACL matching using the ~ and the !~ operators.
 
-Basic strings are enclosed in " ... " and uses URL-style %-escapes.
+Basic strings are enclosed in " ... ", and may not contain newlines.
 
-Long strings are enclosed in {" ... "} and do not have an escape
-character. They may contain any character including ", newline and
-other control characters except for the NUL (0x00) character.
+Long strings are enclosed in {" ... "}. They may contain any
+character including ", newline and other control characters except
+for the NUL (0x00) character.
 
 Unlike C and Perl, the backslash (\) character has no special meaning
 in strings in VCL, so it can be freely used in regular expressions
diff --git a/lib/libvcl/vcc_token.c b/lib/libvcl/vcc_token.c
index 5a1b00c..c5766c0 100644
--- a/lib/libvcl/vcc_token.c
+++ b/lib/libvcl/vcc_token.c
@@ -492,7 +492,7 @@ vcc_Lexer(struct vcc *tl, struct source *sp)
 			continue;
 		}
 
-		/* Match strings, with \\ and \" escapes */
+		/* Match strings */
 		if (*p == '"') {
 			for (q = p + 1; q < sp->e; q++) {
 				if (*q == '"') {



More information about the varnish-commit mailing list