[4.1] 9edd4aa Method names should start with a period

Lasse Karstensen lkarsten at varnish-software.com
Wed May 25 13:30:13 CEST 2016


commit 9edd4aa754bb73a4c34d6059418388cbf8b6f2da
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Tue Mar 29 22:18:10 2016 +0100

    Method names should start with a period
    
    Raise a ParseError exception if not.
    
    Fixes #1885.

diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index b04d91d..748f89b 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -687,6 +687,8 @@ def parse_func(tl, rt_type=None, pobj=None):
 		fname = pobj + fname
 	elif not is_c_name(fname):
 		raise ParseError("Function name '%s' is illegal" % fname)
+	elif pobj != None and fname[0] != ".":
+		raise ParseError("Method name '%s' must start with ." % fname)
 
 	t = tl.get_token()
 	if t.str != "(":



More information about the varnish-commit mailing list