[6.1] efc2f6c15 fix vmod object constructor documentation

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Fri Oct 26 11:54:13 UTC 2018


commit efc2f6c1536cf2272e471f5cff5f145239b19460
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Oct 26 12:34:25 2018 +0200

    fix vmod object constructor documentation
    
    The vmod name got lost in e7c0497404a5b4aadda71aead3b0e7fe946d6993
    
    example before/after diff:
    
    - new xshard_param = shard_param()
    + new xshard_param = directors.shard_param()

diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index dd157449f..7db51c668 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -407,11 +407,13 @@ class ProtoType(object):
             pfx += pfx
         s = pfx
         if type(self.st) == s_object:
-            s += "new x" + self.bname + " = "
+            s += "new " + self.obj + " = "
         elif self.retval is not None:
             s += self.retval.vcl() + " "
 
-        if type(self.st) == s_method:
+        if type(self.st) == s_object:
+            s += self.st.vcc.modname + "." + self.name + "("
+        elif type(self.st) == s_method:
             s += self.obj + self.bname + "("
         else:
             s += self.name + "("


More information about the varnish-commit mailing list