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:
parent
b8c53e96ad
commit
a6fdf2d3bf
4 changed files with 40 additions and 29 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue