For one thing, you have not shown me *your* native part.

Second, see below.

Andrew Haley wrote:
> JNIEXPORT void JNICALL
> Java_somepackage_someNativeMethod
> (JNIEnv *env, jobject this, jbyteArray nativePointer, ...)
> > {
> void *ptr;
> (*env)->GetByteArrayRegion(env, nativePointer, 0, sizeof(void *), (jbyte *) &ptr);


Danger, Will Robinson!  This is not legal C!!!!  You can *not* take
the address of a pointer and cast it to a jbyte*.

What's wrong with it? What do you think you are doing, every time you use malloc(), e.g.:

buffer = (some cast) malloc(...);


All I am doing is the same, and is perfectly legal ANSI/ISO C. Prove me wrong with a specific ISO C specification clause, if you claim otherwise.

Etienne

--
Etienne M. Gagnon, Ph.D.             http://www.info.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/


_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to