[4.1] addeabd Method names should start with a period

Lasse Karstensen lkarsten at varnish-software.com
Tue Jun 14 11:19:09 CEST 2016


commit addeabdb529da092d586fc5408a62127a7ac76f4
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 95bf2d6..2f7253a 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -691,6 +691,8 @@ def parse_func(tl, rt_type=None, pobj=None):
 		raise ParseError("Method name '%s' is illegal" % fname[1:])
 	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