]> err.no Git - varnish/commitdiff
Use C-unsigned for VCL-BOOL variables
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 24 Jun 2007 10:03:09 +0000 (10:03 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 24 Jun 2007 10:03:09 +0000 (10:03 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1542 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vrt.c
varnish-cache/include/vrt_obj.h
varnish-cache/lib/libvcl/syntax.txt
varnish-cache/lib/libvcl/vcc_gen_obj.tcl

index 4109d4c0dd4a9eed1220b2960c1e5439ec570a71..d54a52330daf80ebb10f795bafac3ad098350b13 100644 (file)
@@ -217,8 +217,8 @@ VRT_r_obj_##onm(struct sess *sp)                                    \
        return (sp->obj->field);                                        \
 }
 
-VOBJ(double, valid, valid)
-VOBJ(double, cacheable, cacheable)
+VOBJ(unsigned, valid, valid)
+VOBJ(unsigned, cacheable, cacheable)
 
 /*--------------------------------------------------------------------*/
 
index 07fabade9d9a04888ad237e46faeabca3056be06..2208da7a1d20c044541a26841fb8d007d596539e 100644 (file)
@@ -28,10 +28,10 @@ struct backend * VRT_r_req_backend(struct sess *);
 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 *);
index 489d8c23842406a894c359f82a4e95f2492edfdc..0d1502f499aeaaec2a48755cd3fb92f29df4e5ba 100644 (file)
@@ -154,6 +154,8 @@ assignment:
        var_float '-=' double
        var_float '=' double
        var_backend '=' ident
+       var_string '=' stringval
+       var_string '+=' stringval
 
 assign_int:
        '+=' cnum
@@ -184,6 +186,10 @@ rule0:
        cstr '/' cnum
        '!' cstr
 
+stringval:
+       cstr
+       var_string
+
 cstr:  (string constant)
 
 cnum:  (numeric constant)
index 4674f132b9179266a465225fe066c0ce2a094ea2..b188fbbe3226cbb1da2629772924071fdb0f5bb8 100755 (executable)
@@ -57,7 +57,7 @@ set spobj {
 
 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 *"