Changeset - r19373:45622ebd1794
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-05-26 14:16:27
frosch@openttd.org
(svn r24288) -Fix: squirrel_export should match stuff like 'virtual', 'static' and 'const' only as whole words.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/script/api/squirrel_export.awk
Show inline comments
 
@@ -483,27 +483,27 @@ BEGIN {
 
	if (match($0, "~")) {
 
		if (api_selected != "") {
 
			print "Destructor for '"cls"' has @api. Tag ignored." > "/dev/stderr"
 
			api_selected = ""
 
		}
 
		next
 
	}
 

	
 
	is_static = match($0, "static")
 
	if (match($0, "virtual")) {
 
		virtual_class = "true"
 
	}
 
	gsub("virtual", "", $0)
 
	gsub("static", "", $0)
 
	gsub("const", "", $0)
 
	gsub("\\yvirtual\\y", "", $0)
 
	gsub("\\ystatic\\y", "", $0)
 
	gsub("\\yconst\\y", "", $0)
 
	gsub("{.*", "", $0)
 
	param_s = $0
 
	gsub("\\*", "", $0)
 
	gsub("\\(.*", "", $0)
 

	
 
	sub(".*\\(", "", param_s)
 
	sub("\\).*", "", param_s)
 

	
 
	funcname = $2
 
	if ($1 == cls && funcname == "") {
 
		if (api_selected != "") {
 
			print "Constructor for '"cls"' has @api. Tag ignored." > "/dev/stderr"
0 comments (0 inline, 0 general)