[master] 897f3f7d5 fix vmod object constructor documentation
Nils Goroll
nils.goroll at uplex.de
Fri Oct 26 10:58:16 UTC 2018
commit 897f3f7d58ce512354e91ca1a7cdac06b7f110ed
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