[master] 02de5d3 vmodtool: Do not output the dummy return type VOID of constructors
Nils Goroll
nils.goroll at uplex.de
Tue Feb 27 16:19:08 UTC 2018
commit 02de5d368a597742118ea85b3fb67cf902a1c6fa
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Tue Feb 27 17:16:10 2018 +0100
vmodtool: Do not output the dummy return type VOID of constructors
generated VCL synopsis:
old: new OBJ = VOID dyn(STRING addr, STRING port)
new: new OBJ = dyn(STRING addr, STRING port)
diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index e7bfff4..b24d7d2 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -307,6 +307,7 @@ def nmlegal(nm):
# XXX cant have ( or ) in an argument default value
class prototype(object):
def __init__(self, st, retval=True, prefix=""):
+ self.st = st
ll = st.line[1]
while True:
a1 = ll.count("(")
@@ -359,7 +360,7 @@ class prototype(object):
def vcl_proto(self, short):
s = ""
- if self.retval is not None:
+ if self.retval is not None and type(self.st) != s_object:
s += self.retval.vcl() + " "
s += self.name + "("
ll = []
More information about the varnish-commit
mailing list