r1542 - in trunk/varnish-cache: bin/varnishd include lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Sun Jun 24 12:03:09 CEST 2007


Author: phk
Date: 2007-06-24 12:03:09 +0200 (Sun, 24 Jun 2007)
New Revision: 1542

Modified:
   trunk/varnish-cache/bin/varnishd/cache_vrt.c
   trunk/varnish-cache/include/vrt_obj.h
   trunk/varnish-cache/lib/libvcl/syntax.txt
   trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
Log:
Use C-unsigned for VCL-BOOL variables


Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c	2007-06-24 10:02:41 UTC (rev 1541)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c	2007-06-24 10:03:09 UTC (rev 1542)
@@ -217,8 +217,8 @@
 	return (sp->obj->field);					\
 }
 
-VOBJ(double, valid, valid)
-VOBJ(double, cacheable, cacheable)
+VOBJ(unsigned, valid, valid)
+VOBJ(unsigned, cacheable, cacheable)
 
 /*--------------------------------------------------------------------*/
 

Modified: trunk/varnish-cache/include/vrt_obj.h
===================================================================
--- trunk/varnish-cache/include/vrt_obj.h	2007-06-24 10:02:41 UTC (rev 1541)
+++ trunk/varnish-cache/include/vrt_obj.h	2007-06-24 10:03:09 UTC (rev 1542)
@@ -28,10 +28,10 @@
 void VRT_l_req_backend(struct sess *, struct backend *);
 const char * VRT_r_req_hash(struct sess *);
 void VRT_l_req_hash(struct sess *, const char *);
-double VRT_r_obj_valid(struct sess *);
-void VRT_l_obj_valid(struct sess *, double);
-double VRT_r_obj_cacheable(struct sess *);
-void VRT_l_obj_cacheable(struct sess *, double);
+unsigned VRT_r_obj_valid(struct sess *);
+void VRT_l_obj_valid(struct sess *, unsigned);
+unsigned VRT_r_obj_cacheable(struct sess *);
+void VRT_l_obj_cacheable(struct sess *, unsigned);
 double VRT_r_obj_ttl(struct sess *);
 void VRT_l_obj_ttl(struct sess *, double);
 const char * VRT_r_req_http_(struct sess *);

Modified: trunk/varnish-cache/lib/libvcl/syntax.txt
===================================================================
--- trunk/varnish-cache/lib/libvcl/syntax.txt	2007-06-24 10:02:41 UTC (rev 1541)
+++ trunk/varnish-cache/lib/libvcl/syntax.txt	2007-06-24 10:03:09 UTC (rev 1542)
@@ -154,6 +154,8 @@
 	var_float '-=' double
 	var_float '=' double
 	var_backend '=' ident
+	var_string '=' stringval
+	var_string '+=' stringval
 
 assign_int:
 	'+=' cnum
@@ -184,6 +186,10 @@
 	cstr '/' cnum
 	'!' cstr
 
+stringval:
+	cstr
+	var_string
+
 cstr:	(string constant)
 
 cnum:	(numeric constant)

Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl	2007-06-24 10:02:41 UTC (rev 1541)
+++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl	2007-06-24 10:03:09 UTC (rev 1542)
@@ -57,7 +57,7 @@
 
 set tt(IP)	"struct sockaddr *"
 set tt(STRING)	"const char *"
-set tt(BOOL)	"double"
+set tt(BOOL)	"unsigned"
 set tt(BACKEND)	"struct backend *"
 set tt(TIME)	"double"
 set tt(HEADER)	"const char *"




More information about the varnish-commit mailing list