mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-29 05:55:44 +08:00
852993e381
PR libgcj/23739: * testsuite/libjava.jni/pr23739.c: New file. * testsuite/libjava.jni/pr23739.java: New file. * testsuite/libjava.jni/pr23739.out: New file. * jni.cc (_Jv_JNI_IsAssignableFrom): Reversed arguments. * java/lang/reflect/natMethod.cc (invoke): Updated. * java/lang/natClass.cc (isAssignableFrom): Updated. (isInstance): Likewise. (_Jv_IsAssignableFrom): Reversed arguments. (_Jv_IsInstanceOf): Updated. (_Jv_CheckCast): Likewise. (_Jv_CheckArrayStore): Likewise. (_Jv_IsAssignableFromSlow): Reversed arguments. (_Jv_InterfaceAssignableFrom): Likewise. * link.cc (verify_type_assertions): Updated. * prims.cc (_Jv_CheckAccess): Updated. From-SVN: r103953
13 lines
380 B
C
13 lines
380 B
C
#include <stdio.h>
|
|
#include "pr23739.h"
|
|
|
|
JNIEXPORT void JNICALL
|
|
Java_pr23739_checkOrder (JNIEnv *env, jclass cls, jclass clazz1, jclass clazz2)
|
|
{
|
|
printf ("B extends A\n");
|
|
printf ("isAssignableFrom (A, B): %d\n",
|
|
(*env)->IsAssignableFrom (env, clazz1, clazz2));
|
|
printf ("isAssignableFrom (B, A): %d\n",
|
|
(*env)->IsAssignableFrom (env, clazz2, clazz1));
|
|
}
|