r1293 - trunk/varnish-cache/lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Sat Mar 31 20:20:33 CEST 2007


Author: phk
Date: 2007-03-31 20:20:33 +0200 (Sat, 31 Mar 2007)
New Revision: 1293

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
   trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
Log:
Fix typo, so we correctly recognize '-=' as T_DECR token.



Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2007-03-31 18:19:07 UTC (rev 1292)
+++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2007-03-31 18:20:33 UTC (rev 1293)
@@ -85,6 +85,10 @@
 		}
 		return (0);
 	case '-':
+		if (p[0] == '-' && p[1] == '=') {
+			*q = p + 2;
+			return (T_DECR);
+		}
 		if (p[0] == '-' && p[1] == '-') {
 			*q = p + 2;
 			return (T_DEC);
@@ -103,10 +107,6 @@
 	case '/':
 		if (p[0] == '/' && p[1] == '=') {
 			*q = p + 2;
-			return (T_DECR);
-		}
-		if (p[0] == '/' && p[1] == '=') {
-			*q = p + 2;
 			return (T_DIV);
 		}
 		if (p[0] == '/') {
@@ -391,7 +391,7 @@
 	vcl_tnames[T_CAND] = "&&";
 	vcl_tnames[T_COR] = "||";
 	vcl_tnames[T_DEC] = "--";
-	vcl_tnames[T_DECR] = "/=";
+	vcl_tnames[T_DECR] = "-=";
 	vcl_tnames[T_DELIVER] = "deliver";
 	vcl_tnames[T_DISCARD] = "discard";
 	vcl_tnames[T_DIV] = "/=";

Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl	2007-03-31 18:19:07 UTC (rev 1292)
+++ trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl	2007-03-31 18:20:33 UTC (rev 1293)
@@ -93,7 +93,7 @@
 	{">>"	SHR}
 	{"<<"	SHL}
 	{"+="	INCR}
-	{"/="	DECR}
+	{"-="	DECR}
 	{"*="	MUL}
 	{"/="	DIV}
 }




More information about the varnish-commit mailing list