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@10220 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-01-25 22:03:12 +00:00
commit cc59a22121
2 changed files with 14 additions and 0 deletions

View file

@ -36,6 +36,14 @@ struct YetAnotherStruct {
double extract_ptr(struct YetAnotherStruct *yas, int index) {
return yas[index].simple.double_field;
}
void modifyYAS(struct YetAnotherStruct yas[], int size) {
int i;
for (i=0; i<size; ++i) {
SimpleStruct ss;
ss.double_field = yas[i].simple.double_field * 10.0;
yas[i].simple = ss;
}
}
%}
%apply ARRAYSOFENUMS[ANY] { toe[ANY] }