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:
parent
87394a2daf
commit
cc59a22121
2 changed files with 14 additions and 0 deletions
|
|
@ -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] }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue