[kaffe] Bug Report: jni & two dimensional array parameter
Daniel Dittmann
ddittmann at gmx.de
Tue Sep 23 23:53:03 PDT 2003
Hi all,
i want to call an jni-function with an two-dimensional integer-array
parameter.
The complete example from:
http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/jnistring.html#multi
public class ArrayManipulation {
***snip***
public native void manipulateArray(
int[][] multiplier, Boolean lock);
***snip***
}
The generation of the c-headerfile failed.
>/usr/local/kaffe/bin/javac ArrayManipulation.java
>export CLASSPATH=./:/usr/local/kaffe/jre/lib/rt.jar
>/usr/local/kaffe/bin/javah ArrayManipulation
bogus array type `['
The attached patch fixed this error.
Thank you
Daniel
-------------- next part --------------
diff -Naur kaffe/kaffe/kaffeh/support.c kaffe.patched/kaffe/kaffeh/support.c
--- kaffe/kaffe/kaffeh/support.c 2003-09-19 10:51:56.000000000 +0200
+++ kaffe.patched/kaffe/kaffeh/support.c 2003-08-01 00:46:45.000000000 +0200
@@ -311,6 +311,7 @@
case 'D':
return "jdoubleArray";
case 'L':
+ case '[':
return "jobjectArray";
default:
dprintf("bogus array type `%c'", sig[1]);
More information about the kaffe
mailing list