source: trunk/gcc/libjava/testsuite/libjava.jni/field.c

Last change on this file was 1392, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 401 bytes
Line 
1#include <jni.h>
2#include <field.h>
3
4JNIEXPORT jobjectArray JNICALL
5Java_field_fetch (JNIEnv *env, jobject this)
6{
7 jclass cls;
8 jfieldID fid;
9 jobjectArray obj;
10
11 cls = (*env)->GetObjectClass (env, this);
12 if (! cls)
13 return 0;
14
15 fid = (*env)->GetFieldID (env, cls, "F", "[Ljava/lang/Object;");
16 if (! fid)
17 return 0;
18
19 obj = (*env)->GetObjectField (env, this, fid);
20
21 return obj;
22}
23
24
Note: See TracBrowser for help on using the repository browser.