Implement dummy JNI GetVersion

This commit is contained in:
Eric Scharff 2009-06-22 16:25:13 -06:00
parent c3c06e4e0e
commit f4347dee70
2 changed files with 13 additions and 0 deletions

View File

@ -97,6 +97,14 @@ GetEnv(Machine* m, Thread** t, jint version)
}
}
jsize JNICALL
GetVersion(Thread* t)
{
ENTER(t, Thread::ActiveState);
return JNI_VERSION_1_6;
}
jsize JNICALL
GetStringLength(Thread* t, jstring s)
{
@ -1893,6 +1901,7 @@ populateJNITables(JavaVMVTable* vmTable, JNIEnvVTable* envTable)
memset(envTable, 0, sizeof(JNIEnvVTable));
envTable->GetVersion = ::GetVersion;
envTable->GetStringLength = ::GetStringLength;
envTable->GetStringChars = ::GetStringChars;
envTable->ReleaseStringChars = ::ReleaseStringChars;

View File

@ -94,6 +94,10 @@ const unsigned CompiledFlag = 1 << 1;
const unsigned ConstructorFlag = 1 << 2;
const unsigned FastNative = 1 << 3;
#ifndef JNI_VERSION_1_6
#define JNI_VERSION_1_6 0x00010006
#endif
typedef Machine JavaVM;
typedef Thread JNIEnv;