r5385 - trunk/varnish-cache/lib/libvcl

phk at varnish-cache.org phk at varnish-cache.org
Sat Oct 2 20:14:09 CEST 2010


Author: phk
Date: 2010-10-02 20:14:09 +0200 (Sat, 02 Oct 2010)
New Revision: 5385

Modified:
   trunk/varnish-cache/lib/libvcl/generate.py
Log:
Don't list methods manually, we have them in a variable.



Modified: trunk/varnish-cache/lib/libvcl/generate.py
===================================================================
--- trunk/varnish-cache/lib/libvcl/generate.py	2010-10-02 07:54:47 UTC (rev 5384)
+++ trunk/varnish-cache/lib/libvcl/generate.py	2010-10-02 18:14:09 UTC (rev 5385)
@@ -95,7 +95,6 @@
 	('error',	('restart', 'deliver',)),
 )
 
-
 #######################################################################
 # Variables available in sessions
 
@@ -696,16 +695,12 @@
 
 	vcl_init_f	*init_func;
 	vcl_fini_f	*fini_func;
+""")
 
-	vcl_func_f	*recv_func;
-	vcl_func_f	*pipe_func;
-	vcl_func_f	*pass_func;
-	vcl_func_f	*hash_func;
-	vcl_func_f	*miss_func;
-	vcl_func_f	*hit_func;
-	vcl_func_f	*fetch_func;
-	vcl_func_f	*deliver_func;
-	vcl_func_f	*error_func;
+for i in returns:
+	fo.write("\tvcl_func_f\t*" + i[0] + "_func;\n")
+
+fo.write("""
 };
 """)
 




More information about the varnish-commit mailing list