%extend changes and remove default use of javatype, dtype, cstype %typemaps
1) The %extend directive can now optionally support one of the 'class', 'struct' or 'union'. 2) The SWIG library no longer uses the javatype, dtype or cstype typemaps, thereby completely freeing them up for users to use without having to replicate the library code that they previously added Tested by changes to test: java_lib_arrays
This commit is contained in:
parent
19f21d1dd5
commit
449aa08124
7 changed files with 65 additions and 18 deletions
|
|
@ -337,7 +337,8 @@ JAVA_ARRAYS_TYPEMAPS(double, double, jdouble, Double, "[D") /* double[ANY] *
|
|||
|
||||
/* Add some code to the proxy class of the array type for converting between type used in
|
||||
* JNI class (long[]) and type used in proxy class ( ARRAYSOFCLASSES[] ) */
|
||||
%typemap(javacode) ARRAYSOFCLASSES %{
|
||||
%extend ARRAYSOFCLASSES {
|
||||
%proxycode %{
|
||||
protected static long[] cArrayUnwrap($javaclassname[] arrayWrapper) {
|
||||
long[] cArray = new long[arrayWrapper.length];
|
||||
for (int i=0; i<arrayWrapper.length; i++)
|
||||
|
|
@ -352,6 +353,7 @@ JAVA_ARRAYS_TYPEMAPS(double, double, jdouble, Double, "[D") /* double[ANY] *
|
|||
return arrayWrapper;
|
||||
}
|
||||
%}
|
||||
}
|
||||
|
||||
%enddef /* JAVA_ARRAYSOFCLASSES */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue