VCL compiler creates non-compileable code when calling functions that takes zero arguments (patch attached)

Poul-Henning Kamp phk at
Mon May 16 09:43:27 CEST 2011

In message <BANLkTi=ryksL6cDQL6vrQ7hGn6pb4V9iqA at>, Martin Blix Gr
ydeland writes:

>The VCL compiler will produce code that does not compile when calling
>functions that takes zero arguments (these would be imported from vmods as
>none of the internal functions takes zero arguments). This because it will
>always output a comma in preparation for the arguments. Attached is a patch
>to correct this and only supply the comma when it is needed.

This should be fixed now.  I didn't quite use your patch, because the
fix makes the 'q' variable pointless.

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-dev mailing list