[6.0] 93909642c vmodtool: require method names to start with a dot

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:51 UTC 2018


commit 93909642c813063a22ae8cdd9be687f0cd08cb98
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Apr 27 16:39:06 2018 +0200

    vmodtool: require method names to start with a dot

diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index b6495c5b8..b4de6a036 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -799,6 +799,9 @@ class s_method(stanza):
         assert type(p) == s_object
         self.pfx = p.proto.name
         self.proto = prototype(self, prefix=self.pfx)
+        if not self.proto.bname.startswith("."):
+            err("$Method %s: Method names need to start with . (dot)"
+                % self.proto.bname, warn=False)
         self.proto.obj = "x" + self.pfx
         self.rstlbl = "func_" + self.proto.name
         p.methods.append(self)


More information about the varnish-commit mailing list