Hi all,

i want to call an jni-function with an parameter of two-dimensional array of int.

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



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.orig/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]);




_______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to