Mailing List Archive

r1550 - in trunk/varnish-cache: include lib/libvcl
Author: phk
Date: 2007-06-25 09:04:13 +0200 (Mon, 25 Jun 2007)
New Revision: 1550

Modified:
trunk/varnish-cache/include/vcl_returns.h
trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
Log:
Add VCL_MET_${METHOD} bitmap defines


Modified: trunk/varnish-cache/include/vcl_returns.h
===================================================================
--- trunk/varnish-cache/include/vcl_returns.h 2007-06-25 06:46:34 UTC (rev 1549)
+++ trunk/varnish-cache/include/vcl_returns.h 2007-06-25 07:04:13 UTC (rev 1550)
@@ -41,5 +41,15 @@
VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_INSERT))
VCL_MET_MAC(timeout,TIMEOUT,(VCL_RET_FETCH|VCL_RET_DISCARD))
VCL_MET_MAC(discard,DISCARD,(VCL_RET_DISCARD|VCL_RET_PASS))
+#else
+#define VCL_MET_RECV (1 << 0)
+#define VCL_MET_PIPE (1 << 1)
+#define VCL_MET_PASS (1 << 2)
+#define VCL_MET_HASH (1 << 3)
+#define VCL_MET_MISS (1 << 4)
+#define VCL_MET_HIT (1 << 5)
+#define VCL_MET_FETCH (1 << 6)
+#define VCL_MET_TIMEOUT (1 << 7)
+#define VCL_MET_DISCARD (1 << 8)
#endif
#define N_METHODS 9

Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl 2007-06-25 06:46:34 UTC (rev 1549)
+++ trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl 2007-06-25 07:04:13 UTC (rev 1550)
@@ -192,6 +192,12 @@
puts $for ")"
incr u
}
+puts $for "#else"
+set u 0
+foreach m $methods {
+ puts $for "#define VCL_MET_[string toupper [lindex $m 0]]\t(1 << $u)"
+ incr u
+}
puts $for "#endif"
puts $for "#define N_METHODS $u"
close $for