Prefer overrides with exact name matches over generic name matches.
authorStefanos A. <stapostol@gmail.com>
Wed, 23 Oct 2013 09:42:24 +0000 (11:42 +0200)
committerStefanos A. <stapostol@gmail.com>
Wed, 23 Oct 2013 09:42:24 +0000 (11:42 +0200)
For instance, if we override both ClearBufferfi and ClearBuffer, then
ClearBuffer{i f ui}v will be overriden be ClearBuffer and
ClearBufferfi will be overriden by ClearBufferfi. This allows us to
specialize overrides when necessary.

Source/Bind/FuncProcessor.cs

index b8544f102cb7bf6fde17a5641a11f29dc2c73599..f8b7a3f0825f174b968147723a81e70b0f1fe964 100644 (file)
@@ -121,9 +121,9 @@ namespace Bind
             string ext = d.Extension;
 
             var function_override =
-                nav.SelectSingleNode(String.Format(Path, name, ext)) ??
                 nav.SelectSingleNode(String.Format(Path, d.Name, ext)) ??
-                nav.SelectSingleNode(String.Format(Path, Utilities.StripGL2Extension(d.Name), ext));
+                nav.SelectSingleNode(String.Format(Path, Utilities.StripGL2Extension(d.Name), ext)) ??
+                nav.SelectSingleNode(String.Format(Path, name, ext));
             return function_override;
         }