r4999 - trunk/varnish-cache/lib/libvcl

phk at varnish-cache.org phk at varnish-cache.org
Sun Jul 4 14:49:36 CEST 2010


Author: phk
Date: 2010-07-04 14:49:35 +0200 (Sun, 04 Jul 2010)
New Revision: 4999

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_action.c
   trunk/varnish-cache/lib/libvcl/vcc_compile.h
   trunk/varnish-cache/lib/libvcl/vcc_obj.c
   trunk/varnish-cache/lib/libvcl/vcc_parse.c
   trunk/varnish-cache/lib/libvcl/vcc_string.c
   trunk/varnish-cache/lib/libvcl/vcc_var.c
Log:
In preparation for generic types functions, including conversion functions,
rename "RTIME" to "DURATION", to appease the POLA.



Modified: trunk/varnish-cache/lib/libvcl/vcc_action.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_action.c	2010-07-03 10:23:28 UTC (rev 4998)
+++ trunk/varnish-cache/lib/libvcl/vcc_action.c	2010-07-04 12:49:35 UTC (rev 4999)
@@ -129,7 +129,7 @@
 	case INT:
 	case SIZE:
 	case TIME:
-	case RTIME:
+	case DURATION:
 	case FLOAT:
 		if (tl->t->tok != '=')
 			Fb(tl, 0, "%s %c ", vp->rname, *tl->t->b);

Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_compile.h	2010-07-03 10:23:28 UTC (rev 4998)
+++ trunk/varnish-cache/lib/libvcl/vcc_compile.h	2010-07-04 12:49:35 UTC (rev 4999)
@@ -116,7 +116,7 @@
 	FLOAT,
 	SIZE,
 	TIME,
-	RTIME,
+	DURATION,
 	STRING,
 	IP,
 	HASH,

Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_obj.c	2010-07-03 10:23:28 UTC (rev 4998)
+++ trunk/varnish-cache/lib/libvcl/vcc_obj.c	2010-07-04 12:49:35 UTC (rev 4999)
@@ -128,7 +128,7 @@
 	    0,
 	    0,
 	},
-	{ "req.grace", RTIME, 9,
+	{ "req.grace", DURATION, 9,
 	    "VRT_r_req_grace(sp)",
 	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
 	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
@@ -192,21 +192,21 @@
 	    VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
 	    "HDR_BEREQ",
 	},
-	{ "bereq.connect_timeout", RTIME, 21,
+	{ "bereq.connect_timeout", DURATION, 21,
 	    "VRT_r_bereq_connect_timeout(sp)",
 	    VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS,
 	    "VRT_l_bereq_connect_timeout(sp, ",
 	    VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS,
 	    0,
 	},
-	{ "bereq.first_byte_timeout", RTIME, 24,
+	{ "bereq.first_byte_timeout", DURATION, 24,
 	    "VRT_r_bereq_first_byte_timeout(sp)",
 	    VCL_MET_PASS | VCL_MET_MISS,
 	    "VRT_l_bereq_first_byte_timeout(sp, ",
 	    VCL_MET_PASS | VCL_MET_MISS,
 	    0,
 	},
-	{ "bereq.between_bytes_timeout", RTIME, 27,
+	{ "bereq.between_bytes_timeout", DURATION, 27,
 	    "VRT_r_bereq_between_bytes_timeout(sp)",
 	    VCL_MET_PASS | VCL_MET_MISS,
 	    "VRT_l_bereq_between_bytes_timeout(sp, ",
@@ -220,7 +220,7 @@
 	    VCL_MET_FETCH,
 	    0,
 	},
-	{ "beresp.saintmode", RTIME, 16,
+	{ "beresp.saintmode", DURATION, 16,
 	    NULL,	/* No reads allowed */
 	    0,
 	    "VRT_l_beresp_saintmode(sp, ",
@@ -255,14 +255,14 @@
 	    VCL_MET_FETCH,
 	    0,
 	},
-	{ "beresp.ttl", RTIME, 10,
+	{ "beresp.ttl", DURATION, 10,
 	    "VRT_r_beresp_ttl(sp)",
 	    VCL_MET_FETCH,
 	    "VRT_l_beresp_ttl(sp, ",
 	    VCL_MET_FETCH,
 	    0,
 	},
-	{ "beresp.grace", RTIME, 12,
+	{ "beresp.grace", DURATION, 12,
 	    "VRT_r_beresp_grace(sp)",
 	    VCL_MET_FETCH,
 	    "VRT_l_beresp_grace(sp, ",
@@ -311,21 +311,21 @@
 	    VCL_MET_HIT,
 	    0,
 	},
-	{ "obj.ttl", RTIME, 7,
+	{ "obj.ttl", DURATION, 7,
 	    "VRT_r_obj_ttl(sp)",
 	    VCL_MET_HIT | VCL_MET_ERROR,
 	    "VRT_l_obj_ttl(sp, ",
 	    VCL_MET_HIT | VCL_MET_ERROR,
 	    0,
 	},
-	{ "obj.grace", RTIME, 9,
+	{ "obj.grace", DURATION, 9,
 	    "VRT_r_obj_grace(sp)",
 	    VCL_MET_HIT | VCL_MET_ERROR,
 	    "VRT_l_obj_grace(sp, ",
 	    VCL_MET_HIT | VCL_MET_ERROR,
 	    0,
 	},
-	{ "obj.lastuse", RTIME, 11,
+	{ "obj.lastuse", DURATION, 11,
 	    "VRT_r_obj_lastuse(sp)",
 	    VCL_MET_HIT | VCL_MET_DELIVER | VCL_MET_ERROR,
 	    NULL,	/* No writes allowed */

Modified: trunk/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_parse.c	2010-07-03 10:23:28 UTC (rev 4998)
+++ trunk/varnish-cache/lib/libvcl/vcc_parse.c	2010-07-04 12:49:35 UTC (rev 4999)
@@ -347,7 +347,7 @@
 		case IP:	L(tl, vcc_Cond_Ip(vp, tl)); break;
 		case STRING:	L(tl, vcc_Cond_String(vp, tl)); break;
 		case TIME:	L(tl, vcc_Cond_Int(vp, tl)); break;
-		case RTIME:	L(tl, vcc_Cond_Int(vp, tl)); break;
+		case DURATION:	L(tl, vcc_Cond_Int(vp, tl)); break;
 		case BACKEND:	L(tl, vcc_Cond_Backend(vp, tl)); break;
 		default:
 			vsb_printf(tl->sb,

Modified: trunk/varnish-cache/lib/libvcl/vcc_string.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_string.c	2010-07-03 10:23:28 UTC (rev 4998)
+++ trunk/varnish-cache/lib/libvcl/vcc_string.c	2010-07-04 12:49:35 UTC (rev 4999)
@@ -179,7 +179,7 @@
 		case TIME:
 			Fb(tl, 0, "VRT_time_string(sp, %s)", vp->rname);
 			break;
-		case RTIME:
+		case DURATION:
 			Fb(tl, 0, "VRT_double_string(sp, %s)", vp->rname);
 			break;
 		case BACKEND:

Modified: trunk/varnish-cache/lib/libvcl/vcc_var.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_var.c	2010-07-03 10:23:28 UTC (rev 4998)
+++ trunk/varnish-cache/lib/libvcl/vcc_var.c	2010-07-04 12:49:35 UTC (rev 4999)
@@ -140,7 +140,7 @@
 		vcc_TimeVal(tl, &d);
 		ERRCHK(tl);
 		Fb(tl, 0, "%g", d);
-	} else if (vp->fmt == RTIME) {
+	} else if (vp->fmt == DURATION) {
 		vcc_RTimeVal(tl, &d);
 		ERRCHK(tl);
 		Fb(tl, 0, "%g", d);




More information about the varnish-commit mailing list