[master] a4a1b30 Don't overload symbols

Poul-Henning Kamp phk at FreeBSD.org
Mon Feb 5 10:26:14 UTC 2018


commit a4a1b30390d8a1657bfd0137a982b1c0b904ce69
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Feb 5 10:24:52 2018 +0000

    Don't overload symbols

diff --git a/bin/varnishtest/tests/m00000.vtc b/bin/varnishtest/tests/m00000.vtc
index 14875e6..fc0ecf1 100644
--- a/bin/varnishtest/tests/m00000.vtc
+++ b/bin/varnishtest/tests/m00000.vtc
@@ -12,7 +12,7 @@ varnish v1 -vcl+backend {
 	import vtc;
 
 	sub vcl_init {
-		new obj = debug.obj();
+		new objx = debug.obj();
 	}
 
 	sub vcl_recv {
@@ -28,8 +28,8 @@ varnish v1 -vcl+backend {
 		set resp.http.not = vtc.typesize("*");
 		debug.test_priv_call();
 		debug.test_priv_vcl();
-		obj.test_priv_call();
-		obj.test_priv_vcl();
+		objx.test_priv_call();
+		objx.test_priv_vcl();
 		std.log("VCL" + " initiated " + "log");
 		std.syslog(8 + 7, "Somebody runs varnishtest");
 		debug.rot52(resp);
diff --git a/bin/varnishtest/tests/m00023.vtc b/bin/varnishtest/tests/m00023.vtc
index 919f3cb..7492016 100644
--- a/bin/varnishtest/tests/m00023.vtc
+++ b/bin/varnishtest/tests/m00023.vtc
@@ -12,7 +12,7 @@ varnish v1 -vcl+backend {
 		"127"/24;
 	}
 
-	acl local {
+	acl locals {
 		// We assume c1 and s1 comes from same address
 		"${s1_addr}"/24;
 	}
@@ -24,7 +24,7 @@ varnish v1 -vcl+backend {
 	}
 
 	sub vcl_recv {
-		if (debug.match_acl(ip=client.ip, acl=local)) {
+		if (debug.match_acl(ip=client.ip, acl=locals)) {
 			return (hash);
 		}
 		return (synth(500));
diff --git a/bin/varnishtest/tests/m00027.vtc b/bin/varnishtest/tests/m00027.vtc
index d419b78..d4b8ff7 100644
--- a/bin/varnishtest/tests/m00027.vtc
+++ b/bin/varnishtest/tests/m00027.vtc
@@ -13,7 +13,7 @@ varnish v1 -errvcl "Missing dynamic backend address or port" {
 	}
 
 	sub vcl_init {
-		new obj = debug.dyn("", "");
+		new objx = debug.dyn("", "");
 		std.log("Should not happen");
 	}
 }
diff --git a/bin/varnishtest/tests/r01332.vtc b/bin/varnishtest/tests/r01332.vtc
index 43ca406..1f66167 100644
--- a/bin/varnishtest/tests/r01332.vtc
+++ b/bin/varnishtest/tests/r01332.vtc
@@ -9,12 +9,12 @@ varnish v1 -vcl+backend {
 	import debug;
 
 	sub vcl_init {
-		new obj = debug.obj("don't care");
+		new objx = debug.obj("don't care");
 	}
 
 	sub vcl_deliver {
-		obj.enum(martin);
-		set resp.http.foo = obj.foo("");
+		objx.enum(martin);
+		set resp.http.foo = objx.foo("");
 	}
 } -start
 
diff --git a/bin/varnishtest/tests/r02451.vtc b/bin/varnishtest/tests/r02451.vtc
index ef3c45c..2ff3fac 100644
--- a/bin/varnishtest/tests/r02451.vtc
+++ b/bin/varnishtest/tests/r02451.vtc
@@ -21,7 +21,7 @@ varnish v1 -vcl+backend {
 	import std;
 
 	sub vcl_init {
-		new obj = debug.obj();
+		new objx = debug.obj();
 		new vd = directors.shard();
 		debug.test_priv_task("something");
 		debug.test_priv_task("to remember");
@@ -32,7 +32,7 @@ varnish v1 -vcl+backend {
 		vd.reconfigure(replicas=25);
 
 		std.log("func " + debug.test_priv_task());
-		std.log("obj "	+ obj.test_priv_task());
+		std.log("obj "	+ objx.test_priv_task());
 	}
 
 	sub vcl_recv {
diff --git a/bin/varnishtest/tests/v00041.vtc b/bin/varnishtest/tests/v00041.vtc
index e3636e5..3bac4aa 100644
--- a/bin/varnishtest/tests/v00041.vtc
+++ b/bin/varnishtest/tests/v00041.vtc
@@ -15,14 +15,14 @@ varnish v1 -arg "-p debug=+vclrel" -vcl+backend {
 	import std;
 
 	sub vcl_init {
-		new obj = debug.obj();
+		new objx = debug.obj();
 	}
 
 	sub vcl_init {
 		debug.test_priv_task("something");
 		debug.test_priv_task("to remember");
 		std.log("func " + debug.test_priv_task());
-		std.log("obj "  + obj.test_priv_task());
+		std.log("obj "  + objx.test_priv_task());
 	}
 
 	sub vcl_recv {
@@ -34,11 +34,11 @@ varnish v1 -arg "-p debug=+vclrel" -vcl+backend {
 	sub vcl_deliver {
 		set resp.http.x0 = req.http.x0;
 		set resp.http.x1 = debug.test_priv_task();
-		set resp.http.o1 = obj.test_priv_task();
+		set resp.http.o1 = objx.test_priv_task();
 	}
 
 	sub vcl_backend_fetch {
-		obj.test_priv_task("b");
+		objx.test_priv_task("b");
 		std.log("foo");
 		set bereq.http.bx0 = debug.test_priv_task(bereq.url);
 		std.log("bar");
@@ -47,14 +47,14 @@ varnish v1 -arg "-p debug=+vclrel" -vcl+backend {
 	sub vcl_backend_response {
 		set beresp.http.bx0 = bereq.http.bx0;
 		set beresp.http.bx1 = debug.test_priv_task("");
-		set beresp.http.bo1 = obj.test_priv_task("");
+		set beresp.http.bo1 = objx.test_priv_task("");
 	}
 
 	sub vcl_fini {
 		debug.test_priv_task("cleaning");
 		debug.test_priv_task("up");
 		std.log("func " + debug.test_priv_task());
-		std.log("obj "  + obj.test_priv_task());
+		std.log("obj "  + objx.test_priv_task());
 	}
 
 } -start


More information about the varnish-commit mailing list