* gcc.dg/single-precision-constant.c: Tweak for non-C99 runtimes.
[official-gcc.git] / libjava / testsuite / libjava.jni / field.c
blobbce0cc896e62bbe87185a68e95ccbb9a0c900dba
1 #include <jni.h>
2 #include <field.h>
4 JNIEXPORT jobjectArray JNICALL
5 Java_field_fetch (JNIEnv *env, jobject this)
7 jclass cls;
8 jfieldID fid;
9 jobjectArray obj;
11 cls = (*env)->GetObjectClass (env, this);
12 if (! cls)
13 return 0;
15 fid = (*env)->GetFieldID (env, cls, "F", "[Ljava/lang/Object;");
16 if (! fid)
17 return 0;
19 obj = (*env)->GetObjectField (env, this, fid);
21 return obj;