[master] fcfb0308b cocci: Restructure and enrich vdef.h

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Jul 13 09:50:11 UTC 2023


commit fcfb0308b2c5788902cc17e069d883942741b2cf
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Jul 13 11:39:47 2023 +0200

    cocci: Restructure and enrich vdef.h

diff --git a/tools/coccinelle/vdef.h b/tools/coccinelle/vdef.h
index 3562dce21..b78f0d310 100644
--- a/tools/coccinelle/vdef.h
+++ b/tools/coccinelle/vdef.h
@@ -3,7 +3,7 @@
  * DO read tools/coccinelle/README.rst
  */
 
-/* vdef.h */
+/* include/vdef.h */
 #define v_printflike_(f,a)
 #define v_deprecated_
 #define v_dont_optimize
@@ -11,19 +11,33 @@
 #define v_statevariable_(varname)
 #define v_unused_
 
-/* vrt.h */
-#define VRT_CTX	const struct vrt_ctx *ctx
+/* include/vrt.h */
+#define VRT_CTX const struct vrt_ctx *ctx
 
-/* vcc_if.h */
-#define VPFX(a)	vmod_##a
+/* include/vqueue.h */
+#define VTAILQ_ENTRY(t)		unsigned
+#define VSTAILQ_ENTRY(t)	unsigned
 
-/* vqueue.h */
-#define VTAILQ_ENTRY(x) unsigned
-#define VSTAILQ_ENTRY(x) unsigned
-#define VTAILQ_HEAD(x, y) unsigned
-#define VSTAILQ_HEAD(x, y) unsigned
-#define VRBT_ENTRY(x) unsigned
-#define VRBT_HEAD(x, y) unsigned
+#define VTAILQ_HEAD(n, t)	unsigned
+#define VSTAILQ_HEAD(n, t)	unsigned
+
+#define VTAILQ_HEAD_INITIALIZER(t)	0
+#define VSTAILQ_HEAD_INITIALIZER(t)	0
+
+/* include/vtree.h */
+#define VRBT_ENTRY(x)		unsigned
+#define VRBT_HEAD(x, y)		unsigned
+#define VRBT_INITIALIZER(t)	0
 
 /* lib/libvcc/vcc_vmod.c */
 #define STANZA_TBL
+
+/* bin/varnishd/common/heritage.h */
+#define ASSERT_MGT() (void)0
+
+/* bin/varnishd/cache/cache_transport.h */
+#define TRANSPORTS
+
+/* vmod/vcc_*_if.h */
+#define VPFX(a)		vmod_##a
+#define VARGS(a)	arg_vmod_foo_##a


More information about the varnish-commit mailing list