[master] 535192c3a Timid start of Coccinelle type isomorphisms
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Fri May 3 15:55:08 UTC 2019
commit 535192c3ab8545c9b9bc849327879d773e05804a
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri May 3 17:35:38 2019 +0200
Timid start of Coccinelle type isomorphisms
This way we don't need to constantly deal with typedef ORing when we
encounter a varnish-defined type. We still need to declare typedefs
that we use, but it's already one order of magnitude more convenient.
diff --git a/tools/coccinelle/varnish.iso b/tools/coccinelle/varnish.iso
new file mode 100644
index 000000000..1beb51e90
--- /dev/null
+++ b/tools/coccinelle/varnish.iso
@@ -0,0 +1,35 @@
+/*
+ * This file contains isomorphisms specific to the Varnish code base and
+ * out of tree Varnish projects such as VUTs for VMODs.
+ *
+ * It can be used directly by semantic patches from the same directory
+ * with the following syntax:
+ *
+ * using "varnish.iso"
+ *
+ * XXX: way incomplete.
+ * XXX: consider autogeneration.
+ */
+
+/* This section contains VCL types used by VMODs */
+
+Type
+@ vrt_ctx @
+type VRT_CTX;
+@@
+
+VRT_CTX <=> const struct vrt_ctx *
+
+Type
+@ vcl_void @
+type VCL_VOID;
+@@
+
+VCL_VOID <=> void
+
+Type
+@ vcl_bool @
+type VCL_BOOL;
+@@
+
+VCL_BOOL <=> unsigned
More information about the varnish-commit
mailing list