[master] 381af034a gc unused argument

Nils Goroll nils.goroll at uplex.de
Mon Dec 2 13:18:06 UTC 2019

commit 381af034a232716737052ac1bbb405306815a6fb
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Nov 13 13:13:48 2019 +0100

    gc unused argument
    I actually did consider this before, but thought we should keep it
    because we are currently dicussing to add a CTX to vmod object
    destructors. But this piece of code is unrelated and at any rate the
    argument can be added back when we need it.
    in short: @Dridi is right

diff --git a/bin/varnishd/cache/cache_vrt_vmod.c b/bin/varnishd/cache/cache_vrt_vmod.c
index 183e33aeb..5a5fd1d24 100644
--- a/bin/varnishd/cache/cache_vrt_vmod.c
+++ b/bin/varnishd/cache/cache_vrt_vmod.c
@@ -163,12 +163,10 @@ VPI_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, void *ptr, int len,
-VPI_Vmod_Unload(VRT_CTX, struct vmod **hdl)
+VPI_Vmod_Unload(struct vmod **hdl)
 	struct vmod *v;
-	(void) ctx;
diff --git a/include/vcc_interface.h b/include/vcc_interface.h
index 78dcccdcf..0d46f7c0f 100644
--- a/include/vcc_interface.h
+++ b/include/vcc_interface.h
@@ -53,7 +53,7 @@ void VPI_count(VRT_CTX, unsigned);
 int VPI_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, void *ptr, int len,
     const char *nm, const char *path, const char *file_id, const char *backup);
-void VPI_Vmod_Unload(VRT_CTX, struct vmod **hdl);
+void VPI_Vmod_Unload(struct vmod **hdl);
 typedef int acl_match_f(VRT_CTX, const VCL_IP);
diff --git a/lib/libvcc/vcc_vmod.c b/lib/libvcc/vcc_vmod.c
index dca8eabd8..a4d229a05 100644
--- a/lib/libvcc/vcc_vmod.c
+++ b/lib/libvcc/vcc_vmod.c
@@ -358,7 +358,7 @@ vcc_ParseImport(struct vcc *tl)
 	/* XXX: zero the function pointer structure ?*/
 	VSB_printf(ifp->fin, "\t\tVRT_priv_fini(&vmod_priv_%.*s);", PF(mod));
-	    "\t\tVPI_Vmod_Unload(ctx, &VGC_vmod_%.*s);", PF(mod));
+	    "\t\tVPI_Vmod_Unload(&VGC_vmod_%.*s);", PF(mod));
 	vj = vjsn_parse(vmd->json, &p);

More information about the varnish-commit mailing list