mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-27 17:35:44 +08:00
ae8a67c4c0
* libjava.jni/field.out: New file. * libjava.jni/field.c: New file. * libjava.jni/field.java: New file. From-SVN: r40776
25 lines
383 B
C
25 lines
383 B
C
#include <jni.h>
|
|
#include <field.h>
|
|
|
|
jobjectArray
|
|
Java_field_fetch (JNIEnv *env, jobject this)
|
|
{
|
|
jclass cls;
|
|
jfieldID fid;
|
|
jobjectArray obj;
|
|
|
|
cls = (*env)->GetObjectClass (env, this);
|
|
if (! cls)
|
|
return 0;
|
|
|
|
fid = (*env)->GetFieldID (env, cls, "F", "[Ljava/lang/Object;");
|
|
if (! fid)
|
|
return 0;
|
|
|
|
obj = (*env)->GetObjectField (env, this, fid);
|
|
|
|
return obj;
|
|
}
|
|
|
|
|