From c1ee47d755244260ec9303993a5182c2be06dfdf Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sun, 12 Jun 2016 18:00:00 +0300 Subject: [PATCH] Changed the matching of explicitly patched virtual functions to use qualified names. Signed-off-by: Dimitar Dobrev --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 2 +- src/Generator/Options.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 00bd49f1..b566fa37 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1580,7 +1580,7 @@ namespace CppSharp.Generators.CSharp entry.Kind == VTableComponentKind.DeletingDtorPointer) && !entry.IsIgnored() && (!destructorOnly || entry.Method.IsDestructor || - Driver.Options.ExplicitlyPatchedVirtualFunctions.Contains(entry.Method.OriginalName))) + Driver.Options.ExplicitlyPatchedVirtualFunctions.Contains(entry.Method.QualifiedOriginalName))) WriteLine("{0} = _Thunks[{1}];", managedVftableEntry, wrappedEntries.IndexOf(entry)); else WriteLine("{0} = {1};", managedVftableEntry, nativeVftableEntry); diff --git a/src/Generator/Options.cs b/src/Generator/Options.cs index e6ad0796..6603e6b9 100644 --- a/src/Generator/Options.cs +++ b/src/Generator/Options.cs @@ -41,7 +41,7 @@ namespace CppSharp StripLibPrefix = true; - ExplicitlyPatchedVirtualFunctions = new List(); + ExplicitlyPatchedVirtualFunctions = new HashSet(); } // General options @@ -209,7 +209,7 @@ namespace CppSharp /// /// C# end only: force patching of the virtual entries of the functions in this list. /// - public List ExplicitlyPatchedVirtualFunctions { get; private set; } + public HashSet ExplicitlyPatchedVirtualFunctions { get; private set; } } public class InvalidOptionException : Exception