new directorconnect and directorconnect_derived typemaps (Java)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6841 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
deaf8c681f
commit
0463f339d3
2 changed files with 14 additions and 0 deletions
|
|
@ -28,6 +28,15 @@ public:
|
|||
%}
|
||||
%feature("director");
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(directordisconnect_derived, methodname="disconnect_director") hi::A1 {
|
||||
// Uncomment to see if the call actually happens (it does... :-)
|
||||
// System.out.println("A1 Java object disconnecting from director.");
|
||||
swigCMemOwn = false;
|
||||
$jnicall;
|
||||
}
|
||||
#endif
|
||||
|
||||
// basic renaming
|
||||
%rename(rg) A::gg;
|
||||
%feature("nodirector") hi::A1::gg;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ public class director_basic_runme {
|
|||
if (!b.pong().equals("Foo::pong();Foo::ping()")) {
|
||||
throw new RuntimeException ( "b.pong()" );
|
||||
}
|
||||
|
||||
/* Test A1's directordisconnect method rename */
|
||||
A1 a1 = new A1(1, false);
|
||||
|
||||
a1.delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue