[3.0] 0a7a30d Fix string documentation for 3.0
Tollef Fog Heen
tfheen at varnish-cache.org
Thu Sep 22 14:02:02 CEST 2011
commit 0a7a30da941e461cfb7761ca46a9076500e6a0d2
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