Skip to content

Commit 34a2735

Browse files
committed
Final tidy up for improved C# SwigDerviedClassHasMethod implementation
1 parent b4cc35d commit 34a2735

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGES.current

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
77
Version 4.1.0 (in progress)
88
===========================
99

10+
2022-05-26: rokups
11+
[C#] #1323 Modify SwigDerivedClassHasMethod for a more efficient director
12+
implementation when calling virtual methods that are not overidden.
13+
1014
2022-05-15: erezgeva, eiselekd
1115
[Lua, Perl, Octave, PHP, Tcl] #2275 #2276 #2283 Add argcargv.i library containing
1216
(int ARGC, char **ARGV) multi-argument typemaps.

Examples/test-suite/csharp/director_basic_runme.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void run()
5050
myNewBar.x = 10;
5151

5252
// Low level implementation check
53-
// my.testSwigDerivedClassHasMethod();
53+
my.testSwigDerivedClassHasMethod();
5454

5555
// These should not call the C# implementations as they are not overridden
5656
int v;

Examples/test-suite/director_basic.i

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@
7171
%}
7272

7373
%typemap(cscode) MyClass %{
74+
// low level implementation check for checking MyOverriddenClass
7475
public void testSwigDerivedClassHasMethod() {
7576
if (SwigDerivedClassHasMethod("nonVirtual", swigMethodTypes3))
76-
throw new global::System.Exception("non-overriding non-virtual method would be when connecting director");
77+
throw new global::System.Exception("SwigDerivedClassHasMethod failed checking a non-overriding non-virtual method (nonVirtual)");
7778
if (SwigDerivedClassHasMethod("nonOverride", swigMethodTypes4))
78-
throw new global::System.Exception("non-overriding virtual method would be when connecting director");
79+
throw new global::System.Exception("SwigDerivedClassHasMethod failed checking a non-overriding method (nonOverride)");
7980
}
8081
%}
8182

0 commit comments

Comments
 (0)