Add Java premature garbage collection prevention parameter (pgcpp) to interface feature

pgcpp was turned off but it is still needed for the interface feature
to prevent premature garbage collection of the proxy class being passed
into the C++ layer.
This commit is contained in:
William S Fulton 2016-02-24 08:30:10 +00:00
commit 1737fc9b9b
2 changed files with 22 additions and 13 deletions

View file

@ -1,6 +1,6 @@
%define DECLARE_INTERFACE_(INTERFACE, IMPL, CTYPE...)
%feature("interface", name="INTERFACE") CTYPE;
%typemap(jtype, nopgcpp="1") CTYPE, CTYPE *, CTYPE *const&, CTYPE [], CTYPE & "long"
%typemap(jtype) CTYPE, CTYPE *, CTYPE *const&, CTYPE [], CTYPE & "long"
%typemap(jstype) CTYPE, CTYPE *, CTYPE *const&, CTYPE [], CTYPE & "INTERFACE"
%typemap(javain) CTYPE, CTYPE & "$javainput." ## #INTERFACE ## "_SWIGInterfaceUpcast()"
%typemap(javain) CTYPE *, CTYPE *const&, CTYPE [] "($javainput == null) ? 0 : $javainput." ## #INTERFACE ## "_SWIGInterfaceUpcast()"