[Gridflow-cvs] [svn] commit: r3838 - /trunk/base/source_filter.rb

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Jun 10 12:33:11 EDT 2008


Author: matju
Date: Tue Jun 10 12:33:10 2008
New Revision: 3838

Log:
accept diverging argument names in \decl vs \def

Modified:
    trunk/base/source_filter.rb

Modified: trunk/base/source_filter.rb
==============================================================================
--- trunk/base/source_filter.rb (original)
+++ trunk/base/source_filter.rb Tue Jun 10 12:33:10 2008
@@ -35,6 +35,11 @@
 	def ==(o)
 		return false unless rettype==o.rettype && maxargs==o.maxargs
 		arglist.each_index{|i| arglist[i] == o.arglist[i] or return false }
+		return true
+	end
+	def ===(o)
+		return false unless rettype==o.rettype && maxargs==o.maxargs
+		arglist.each_index{|i| arglist[i].type == o.arglist[i].type and arglist[i].default == o.arglist[i].default or return false }
 		return true
 	end
 	attr_accessor :done
@@ -147,7 +152,7 @@
 	classname = qlass.name
 	if qlass.methods[m.selector]
 		n = m; m = qlass.methods[m.selector]
-		if m!=n then
+		if !m===n then
 			STDERR.puts "ERROR: def does not match decl:"
 			STDERR.puts "#{m.where}: \\decl #{m.inspect}"
 			STDERR.puts "#{n.where}: \\def #{n.inspect}"
@@ -172,7 +177,7 @@
 		end
 	}
 	Out.print ");} #{m.rettype} #{classname}::#{m.selector}(VA"
-	Out.print ","+unparse_arglist(m.arglist,false) if m.arglist.length>0
+	Out.print ","+unparse_arglist(n.arglist,false) if m.arglist.length>0
 	Out.print ")#{term} "
 	qlass.methods[m.selector].done=true
 end



More information about the Gridflow-cvs mailing list