diff options
author | Kenneth Russel <[email protected]> | 2004-04-23 16:32:51 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2004-04-23 16:32:51 +0000 |
commit | 0268b8b446fcff93971c1d0dd3b188b3cb5436d9 (patch) | |
tree | 584ee84cded91936d85823c2178abbfc77f698bd /src/net/java/games/gluegen | |
parent | 33073d36be0932f7a15cf04e3b42ef53a80337b8 (diff) |
Fixed lurking bug in native array copying code generation if more than
one array needed to be copied
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@122 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/gluegen')
-rw-r--r-- | src/net/java/games/gluegen/CMethodBindingEmitter.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/java/games/gluegen/CMethodBindingEmitter.java b/src/net/java/games/gluegen/CMethodBindingEmitter.java index e72c0ab77..e65b8ca00 100644 --- a/src/net/java/games/gluegen/CMethodBindingEmitter.java +++ b/src/net/java/games/gluegen/CMethodBindingEmitter.java @@ -721,7 +721,14 @@ public class CMethodBindingEmitter extends FunctionEmitter } writer.println(" /* Clean up " + convName + "_copy */"); + + // Re-fetch length of array that was copied String arrayLenName = "_tmpArrayLen"; + writer.print(" "); + writer.print(arrayLenName); + writer.print(" = (*env)->GetArrayLength(env, "); + writer.print(binding.getArgumentName(i)); + writer.println(");"); // free each element PointerType cArgPtrType = cArgType.asPointer(); |