[master] 5ff2645 Handle default values without spaces around the equal sign

Federico G. Schwindt fgsch at lodoss.net
Thu Nov 27 17:38:51 CET 2014


commit 5ff26458f0b9ef632032ac5c68f8419749606946
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Thu Nov 27 16:33:57 2014 +0000

    Handle default values without spaces around the equal sign

diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index 15f82aa..dbd5051 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -732,7 +732,7 @@ class FileSection(object):
 			return
 		l = re.sub("[ \t]*#.*$", "", l)
 		l = re.sub("[ \t]*\n", "", l)
-		l = re.sub("([(){},])", r' \1 ', l)
+		l = re.sub("([(){},=])", r' \1 ', l)
 		if l == "":
 			return
 		for j in l.split():
diff --git a/lib/libvmod_debug/vmod.vcc b/lib/libvmod_debug/vmod.vcc
index b2b661f..a027779 100644
--- a/lib/libvmod_debug/vmod.vcc
+++ b/lib/libvmod_debug/vmod.vcc
@@ -39,7 +39,7 @@ $Function VOID panic(STRING_LIST)
 
 Don't.
 
-$Function STRING author(ENUM { phk, des, kristian, mithrandir } person = "phk")
+$Function STRING author(ENUM { phk, des, kristian, mithrandir } person="phk")
 
 Test function for ENUM arguments
 
@@ -55,7 +55,7 @@ $Function STRING test_priv_task(PRIV_TASK, STRING)
 
 Test function for TASK private pointers
 
-$Function BLOB str2blob(STRING src = "foo")
+$Function BLOB str2blob(STRING src="foo")
 
 Turn a string into a blob
 
@@ -90,4 +90,4 @@ $Function VOID rot52(HTTP hdr)
 Encrypt the HTTP header with quad-ROT13 encryption,
 (this is approx 33% better than triple-DES).
 
-$Function STRING argtest(STRING one, REAL two = 2, STRING three = "3")
+$Function STRING argtest(STRING one, REAL two=2, STRING three="3")



More information about the varnish-commit mailing list