natMethod.cc (_Jv_CallAnyMethodA): Allocate a full jvalue for each argument.

* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Allocate a full
        jvalue for each argument. Simplify.
	* testsuite/libjava.jni/calls.c (docall),
	testsuite/libjava.jni/calls.java (longpb_f): check for argument
	misalignment.

From-SVN: r63563
This commit is contained in:
Hans Boehm 2003-02-28 17:26:29 +00:00 committed by Hans Boehm
parent b8c53e96ad
commit a6fdf2d3bf
4 changed files with 40 additions and 29 deletions

View file

@ -47,6 +47,12 @@ Java_calls_docall (JNIEnv *env, jobject _this)
if (l != 2033)
++fails;
method = (*env)->GetStaticMethodID (env, klass, "longpb_f", "(BJBJBJ)J");
l = (*env)->CallStaticLongMethod (env, klass, method, (jbyte) 13, (jlong) 3,
(jbyte) 13, (jlong) 3, (jbyte) 13, (jlong) 4);
if (l != 3033)
++fails;
method = (*env)->GetMethodID (env, klass, "void_f", "()V");
(*env)->CallVoidMethod (env, _this, method);

View file

@ -37,6 +37,12 @@ public class calls extends base
return q + 2023;
}
public static long longpb_f (byte b1, long q1, byte b2, long q2,
byte b3, long q3)
{
return q1 + q2 + q3 + 3023;
}
public void void_f ()
{
System.out.println ("void");