Final tidy up for improved C# SwigDerviedClassHasMethod implementation

This commit is contained in:
William S Fulton 2022-05-26 08:44:51 +01:00
commit 34a27359ae
3 changed files with 8 additions and 3 deletions

View file

@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.1.0 (in progress)
===========================
2022-05-26: rokups
[C#] #1323 Modify SwigDerivedClassHasMethod for a more efficient director
implementation when calling virtual methods that are not overidden.
2022-05-15: erezgeva, eiselekd
[Lua, Perl, Octave, PHP, Tcl] #2275 #2276 #2283 Add argcargv.i library containing
(int ARGC, char **ARGV) multi-argument typemaps.

View file

@ -50,7 +50,7 @@ public class runme
myNewBar.x = 10;
// Low level implementation check
// my.testSwigDerivedClassHasMethod();
my.testSwigDerivedClassHasMethod();
// These should not call the C# implementations as they are not overridden
int v;

View file

@ -71,11 +71,12 @@
%}
%typemap(cscode) MyClass %{
// low level implementation check for checking MyOverriddenClass
public void testSwigDerivedClassHasMethod() {
if (SwigDerivedClassHasMethod("nonVirtual", swigMethodTypes3))
throw new global::System.Exception("non-overriding non-virtual method would be when connecting director");
throw new global::System.Exception("SwigDerivedClassHasMethod failed checking a non-overriding non-virtual method (nonVirtual)");
if (SwigDerivedClassHasMethod("nonOverride", swigMethodTypes4))
throw new global::System.Exception("non-overriding virtual method would be when connecting director");
throw new global::System.Exception("SwigDerivedClassHasMethod failed checking a non-overriding method (nonOverride)");
}
%}