[master] a865c773b Start a semantic patch archive

Nils Goroll nils.goroll at uplex.de
Tue Feb 9 16:15:09 UTC 2021


commit a865c773b343cf48d7147594d3beb4c84c5f0278
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Feb 9 16:54:03 2021 +0100

    Start a semantic patch archive
    
    Move patches there which are not intended to be applied again, but which
    we used once and want to keep for reference.
    
    Also another coccinelle script which I found useful at one point.

diff --git a/tools/coccinelle/README.rst b/tools/coccinelle/README.rst
index 0c9c06d9e..e51e5741d 100644
--- a/tools/coccinelle/README.rst
+++ b/tools/coccinelle/README.rst
@@ -10,4 +10,7 @@ Unless noted otherwise, all patches should work when invoked as::
 	       -I include/ -I bin/varnishd/ --dir . --in-place \
 	       --sp-file $COCCI
 
+The ``archive/`` directory contains patches which we used once and
+should not need again, but want to retain for reference.
+
 .. _coccinelle: http://coccinelle.lip6.fr/
diff --git a/tools/coccinelle/archive/vdp.cocci b/tools/coccinelle/archive/vdp.cocci
new file mode 100644
index 000000000..6351ded3d
--- /dev/null
+++ b/tools/coccinelle/archive/vdp.cocci
@@ -0,0 +1,31 @@
+/*
+ * facilitate second half of phks vdp signature overhaul
+ */
+
+@@
+expression req;
+@@
+
+-VDP_Close(req)
++VDP_Close(req->vdc)
+
+@@
+expression req;
+@@
+
+-VDP_DeliverObj(req)
++VDP_DeliverObj(req->vdc, req->objcore)
+
+@@
+expression req, vdp, priv;
+@@
+
+-VDP_Push(req, vdp, priv)
++VDP_Push(req->vdc, req->ws, vdp, priv)
+
+@@
+expression req, vdp, priv;
+@@
+
+-VDP_Push(req, &vdp, priv)
++VDP_Push(req->vdc, req->ws, &vdp, priv)
diff --git a/tools/coccinelle/vsb_tofile.cocci b/tools/coccinelle/archive/vsb_tofile.cocci
similarity index 100%
rename from tools/coccinelle/vsb_tofile.cocci
rename to tools/coccinelle/archive/vsb_tofile.cocci
diff --git a/tools/coccinelle/ws_reserve.cocci b/tools/coccinelle/archive/ws_reserve.cocci
similarity index 100%
rename from tools/coccinelle/ws_reserve.cocci
rename to tools/coccinelle/archive/ws_reserve.cocci


More information about the varnish-commit mailing list