Fix ARRAYSOFCLASSES bug reported by Kevin Mills where the changes made to an array element in the C layer are not reflected back into Java
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10219 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
09113cc0bf
commit
87394a2daf
2 changed files with 8 additions and 3 deletions
|
|
@ -1,6 +1,11 @@
|
||||||
Version 1.3.34 (in progress)
|
Version 1.3.34 (in progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
01/25/2008: wsfulton
|
||||||
|
[Java] Fix bug reported by Kevin Mills in ARRAYSOFCLASSES typemaps where any
|
||||||
|
changes made to an array element passed from Java to C are not reflected back
|
||||||
|
into Java.
|
||||||
|
|
||||||
01/24/2008: mgossage
|
01/24/2008: mgossage
|
||||||
More updates to the configure script for detecting lua.
|
More updates to the configure script for detecting lua.
|
||||||
Also looks in /usr/include/lua*
|
Also looks in /usr/include/lua*
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,8 @@ JAVA_ARRAYS_TYPEMAPS(double, double, jdouble, Double, "[D") /* double[ANY] *
|
||||||
/* Arrays of proxy classes. The typemaps in this macro make it possible to treat an array of
|
/* Arrays of proxy classes. The typemaps in this macro make it possible to treat an array of
|
||||||
* class/struct/unions as an array of Java classes.
|
* class/struct/unions as an array of Java classes.
|
||||||
* Use the following macro to use these typemaps for an array of class/struct/unions called name:
|
* Use the following macro to use these typemaps for an array of class/struct/unions called name:
|
||||||
* JAVA_ARRAYSOFCLASSES(name) */
|
* JAVA_ARRAYSOFCLASSES(name)
|
||||||
|
* Note that multiple copies of the class/struct is made when using the array as a parameter input. */
|
||||||
%define JAVA_ARRAYSOFCLASSES(ARRAYSOFCLASSES)
|
%define JAVA_ARRAYSOFCLASSES(ARRAYSOFCLASSES)
|
||||||
|
|
||||||
%typemap(jni) ARRAYSOFCLASSES[ANY], ARRAYSOFCLASSES[] "jlongArray"
|
%typemap(jni) ARRAYSOFCLASSES[ANY], ARRAYSOFCLASSES[] "jlongArray"
|
||||||
|
|
@ -304,8 +305,7 @@ JAVA_ARRAYS_TYPEMAPS(double, double, jdouble, Double, "[D") /* double[ANY] *
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<sz$argnum; i++) {
|
for (i=0; i<sz$argnum; i++) {
|
||||||
jarr$argnum[i] = 0;
|
**($&1_ltype)&jarr$argnum[i] = $1[i];
|
||||||
*($&1_ltype)&jarr$argnum[i] = &$1[i];
|
|
||||||
}
|
}
|
||||||
JCALL3(ReleaseLongArrayElements, jenv, $input, jarr$argnum, 0);
|
JCALL3(ReleaseLongArrayElements, jenv, $input, jarr$argnum, 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue