summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.jni/findclass.c
blob: 1a58a55fee477e81f9309b3eef48c19604e61ea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdlib.h>

#include <findclass.h>

JNIEXPORT jclass JNICALL
Java_findclass_doit (JNIEnv *env, jclass klass, jstring name)
{
  const char *buf = (*env)->GetStringUTFChars (env, name, NULL);
  jclass k = (*env)->FindClass (env, buf);
  (*env)->ReleaseStringUTFChars (env, name, buf);
  return k;
}