source: trunk/gcc/libjava/testsuite/libjava.jni/cxxtest.cc

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

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