mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-26 22:34:27 +08:00
jni.h: Add missing JNICALL and JNIEXPORT attributes to function and function pointer...
2002-11-19 Ranjit Mathew <rmathew@hotmail.com> * include/jni.h: Add missing JNICALL and JNIEXPORT attributes to function and function pointer declarations in accordance with Sun's JDKs. Define JNIIMPEXP to either JNIEXPORT or JNIIMPORT based on whether __GCJ_JNI_IMPL__ has been defined or not. * jni.cc: Add missing JNICALL and JNIEXPORT attributes to JNI function definitions. From-SVN: r59277
This commit is contained in:
parent
d5fc82c51a
commit
93745862c4
@ -1,3 +1,12 @@
|
||||
2002-11-19 Ranjit Mathew <rmathew@hotmail.com>
|
||||
|
||||
* include/jni.h: Add missing JNICALL and JNIEXPORT attributes
|
||||
to function and function pointer declarations in accordance with
|
||||
Sun's JDKs. Define JNIIMPEXP to either JNIEXPORT or JNIIMPORT
|
||||
based on whether __GCJ_JNI_IMPL__ has been defined or not.
|
||||
* jni.cc: Add missing JNICALL and JNIEXPORT attributes to
|
||||
JNI function definitions.
|
||||
|
||||
2002-11-18 Jesse Rosenstock <jmr@ugcs.caltech.edu>
|
||||
|
||||
* java/nio/charset/CoderResult.java (Cache.get): Fix a bug
|
||||
|
@ -174,7 +174,7 @@ typedef void *jmethodID;
|
||||
#define JNI_EVERSION -3
|
||||
|
||||
/* Linkage and calling conventions. */
|
||||
#if defined(_WIN32) || defined (__WIN32__) || defined (WIN32)
|
||||
#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
|
||||
|
||||
#define JNIIMPORT __declspec(dllimport)
|
||||
#define JNIEXPORT __declspec(dllexport)
|
||||
@ -188,6 +188,12 @@ typedef void *jmethodID;
|
||||
|
||||
#endif /* !( _WIN32 || __WIN32__ || WIN32) */
|
||||
|
||||
#ifdef __GCJ_JNI_IMPL__
|
||||
#define JNIIMPEXP JNIEXPORT
|
||||
#else
|
||||
#define JNIIMPEXP JNIIMPORT
|
||||
#endif /* ! __GCJ_JNI_IMPL__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
@ -195,14 +201,14 @@ extern "C"
|
||||
|
||||
/* These functions might be defined in libraries which we load; the
|
||||
JNI implementation calls them at the appropriate times. */
|
||||
extern jint JNI_OnLoad (JavaVM *, void *);
|
||||
extern void JNI_OnUnload (JavaVM *, void *);
|
||||
extern JNIEXPORT jint JNICALL JNI_OnLoad (JavaVM *, void *);
|
||||
extern JNIEXPORT void JNICALL JNI_OnUnload (JavaVM *, void *);
|
||||
|
||||
/* These functions are called by user code to start using the
|
||||
invocation API. */
|
||||
extern jint JNI_GetDefaultJavaVMInitArgs (void *);
|
||||
extern jint JNI_CreateJavaVM (JavaVM **, void **, void *);
|
||||
extern jint JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
|
||||
extern JNIIMPEXP jint JNICALL JNI_GetDefaultJavaVMInitArgs (void *);
|
||||
extern JNIIMPEXP jint JNICALL JNI_CreateJavaVM (JavaVM **, void **, void *);
|
||||
extern JNIIMPEXP jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
@ -242,419 +248,418 @@ struct JNINativeInterface
|
||||
_Jv_func reserved2;
|
||||
_Jv_func reserved3;
|
||||
|
||||
jint (*GetVersion) (JNIEnv *);
|
||||
jclass (*DefineClass) (JNIEnv *, jobject,
|
||||
const jbyte *, jsize);
|
||||
jclass (*FindClass) (JNIEnv *, const char *);
|
||||
jint (JNICALL *GetVersion) (JNIEnv *);
|
||||
jclass (JNICALL *DefineClass) (JNIEnv *, jobject,
|
||||
const jbyte *, jsize);
|
||||
jclass (JNICALL *FindClass) (JNIEnv *, const char *);
|
||||
|
||||
jmethodID (*FromReflectedMethod) (JNIEnv *, jobject);
|
||||
jfieldID (*FromReflectedField) (JNIEnv *, jobject);
|
||||
jobject (*ToReflectedMethod) (JNIEnv *, jclass, jmethodID,
|
||||
jboolean);
|
||||
jmethodID (JNICALL *FromReflectedMethod) (JNIEnv *, jobject);
|
||||
jfieldID (JNICALL *FromReflectedField) (JNIEnv *, jobject);
|
||||
jobject (JNICALL *ToReflectedMethod) (JNIEnv *, jclass, jmethodID,
|
||||
jboolean);
|
||||
|
||||
jclass (*GetSuperclass) (JNIEnv *, jclass);
|
||||
jboolean (*IsAssignableFrom) (JNIEnv *, jclass, jclass);
|
||||
jclass (JNICALL *GetSuperclass) (JNIEnv *, jclass);
|
||||
jboolean (JNICALL *IsAssignableFrom) (JNIEnv *, jclass, jclass);
|
||||
|
||||
jobject (*ToReflectedField) (JNIEnv *, jclass, jfieldID,
|
||||
jboolean);
|
||||
jobject (JNICALL *ToReflectedField) (JNIEnv *, jclass, jfieldID,
|
||||
jboolean);
|
||||
|
||||
jint (*Throw) (JNIEnv *, jthrowable);
|
||||
jint (*ThrowNew) (JNIEnv *, jclass, const char *);
|
||||
jthrowable (*ExceptionOccurred) (JNIEnv *);
|
||||
void (*ExceptionDescribe) (JNIEnv *);
|
||||
void (*ExceptionClear) (JNIEnv *);
|
||||
void (*FatalError) (JNIEnv *, const char *);
|
||||
jint (JNICALL *Throw) (JNIEnv *, jthrowable);
|
||||
jint (JNICALL *ThrowNew) (JNIEnv *, jclass,
|
||||
const char *);
|
||||
jthrowable (JNICALL *ExceptionOccurred) (JNIEnv *);
|
||||
void (JNICALL *ExceptionDescribe) (JNIEnv *);
|
||||
void (JNICALL *ExceptionClear) (JNIEnv *);
|
||||
void (JNICALL *FatalError) (JNIEnv *, const char *);
|
||||
|
||||
jint (*PushLocalFrame) (JNIEnv *, jint);
|
||||
jobject (*PopLocalFrame) (JNIEnv *, jobject);
|
||||
jint (JNICALL *PushLocalFrame) (JNIEnv *, jint);
|
||||
jobject (JNICALL *PopLocalFrame) (JNIEnv *, jobject);
|
||||
|
||||
jobject (*NewGlobalRef) (JNIEnv *, jobject);
|
||||
void (*DeleteGlobalRef) (JNIEnv *, jobject);
|
||||
void (*DeleteLocalRef) (JNIEnv *, jobject);
|
||||
jboolean (*IsSameObject) (JNIEnv *, jobject, jobject);
|
||||
jobject (JNICALL *NewGlobalRef) (JNIEnv *, jobject);
|
||||
void (JNICALL *DeleteGlobalRef) (JNIEnv *, jobject);
|
||||
void (JNICALL *DeleteLocalRef) (JNIEnv *, jobject);
|
||||
jboolean (JNICALL *IsSameObject) (JNIEnv *, jobject,
|
||||
jobject);
|
||||
|
||||
jobject (*NewLocalRef) (JNIEnv *, jobject);
|
||||
jint (*EnsureLocalCapacity) (JNIEnv *, jint);
|
||||
jobject (JNICALL *NewLocalRef) (JNIEnv *, jobject);
|
||||
jint (JNICALL *EnsureLocalCapacity) (JNIEnv *, jint);
|
||||
|
||||
jobject (*AllocObject) (JNIEnv *, jclass);
|
||||
jobject (*NewObject) (JNIEnv *, jclass, jmethodID, ...);
|
||||
jobject (*NewObjectV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jobject (*NewObjectA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jobject (JNICALL *AllocObject) (JNIEnv *, jclass);
|
||||
jobject (JNICALL *NewObject) (JNIEnv *, jclass,
|
||||
jmethodID, ...);
|
||||
jobject (JNICALL *NewObjectV) (JNIEnv *, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jobject (JNICALL *NewObjectA) (JNIEnv *, jclass,
|
||||
jmethodID, jvalue *);
|
||||
|
||||
jclass (*GetObjectClass) (JNIEnv *, jobject);
|
||||
jboolean (*IsInstanceOf) (JNIEnv *, jobject, jclass);
|
||||
jmethodID (*GetMethodID) (JNIEnv *, jclass, const char *,
|
||||
jclass (JNICALL *GetObjectClass) (JNIEnv *, jobject);
|
||||
jboolean (JNICALL *IsInstanceOf) (JNIEnv *, jobject, jclass);
|
||||
jmethodID (JNICALL *GetMethodID) (JNIEnv *, jclass,
|
||||
const char *, const char *);
|
||||
|
||||
jobject (JNICALL *CallObjectMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
jobject (JNICALL *CallObjectMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jobject (JNICALL *CallObjectMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jboolean (JNICALL *CallBooleanMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jboolean (JNICALL *CallBooleanMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jboolean (JNICALL *CallBooleanMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jbyte (JNICALL *CallByteMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
jbyte (JNICALL *CallByteMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jbyte (JNICALL *CallByteMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jchar (JNICALL *CallCharMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
jchar (JNICALL *CallCharMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jchar (JNICALL *CallCharMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jshort (JNICALL *CallShortMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
jshort (JNICALL *CallShortMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jshort (JNICALL *CallShortMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jint (JNICALL *CallIntMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
jint (JNICALL *CallIntMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jint (JNICALL *CallIntMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jlong (JNICALL *CallLongMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
jlong (JNICALL *CallLongMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jlong (JNICALL *CallLongMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jfloat (JNICALL *CallFloatMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
jfloat (JNICALL *CallFloatMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jfloat (JNICALL *CallFloatMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jdouble (JNICALL *CallDoubleMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
jdouble (JNICALL *CallDoubleMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jdouble (JNICALL *CallDoubleMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
void (JNICALL *CallVoidMethod) (JNIEnv *, jobject, jmethodID, ...);
|
||||
void (JNICALL *CallVoidMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
void (JNICALL *CallVoidMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
|
||||
jobject (JNICALL *CallNonvirtualObjectMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jobject (JNICALL *CallNonvirtualObjectMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jobject (JNICALL *CallNonvirtualObjectMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jboolean (JNICALL *CallNonvirtualBooleanMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jboolean (JNICALL *CallNonvirtualBooleanMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jboolean (JNICALL *CallNonvirtualBooleanMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jbyte (JNICALL *CallNonvirtualByteMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jbyte (JNICALL *CallNonvirtualByteMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jbyte (JNICALL *CallNonvirtualByteMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jchar (JNICALL *CallNonvirtualCharMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jchar (JNICALL *CallNonvirtualCharMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jchar (JNICALL *CallNonvirtualCharMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jshort (JNICALL *CallNonvirtualShortMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jshort (JNICALL *CallNonvirtualShortMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jshort (JNICALL *CallNonvirtualShortMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jint (JNICALL *CallNonvirtualIntMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jint (JNICALL *CallNonvirtualIntMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jint (JNICALL *CallNonvirtualIntMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jlong (JNICALL *CallNonvirtualLongMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jlong (JNICALL *CallNonvirtualLongMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jlong (JNICALL *CallNonvirtualLongMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jfloat (JNICALL *CallNonvirtualFloatMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jfloat (JNICALL *CallNonvirtualFloatMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jfloat (JNICALL *CallNonvirtualFloatMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jdouble (JNICALL *CallNonvirtualDoubleMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jdouble (JNICALL *CallNonvirtualDoubleMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jdouble (JNICALL *CallNonvirtualDoubleMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
void (JNICALL *CallNonvirtualVoidMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
void (JNICALL *CallNonvirtualVoidMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
void (JNICALL *CallNonvirtualVoidMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
|
||||
jfieldID (JNICALL *GetFieldID) (JNIEnv *, jclass, const char *,
|
||||
const char *);
|
||||
|
||||
jobject (*CallObjectMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jobject (*CallObjectMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jobject (*CallObjectMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jboolean (*CallBooleanMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jboolean (*CallBooleanMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jboolean (*CallBooleanMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jbyte (*CallByteMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jbyte (*CallByteMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jbyte (*CallByteMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jchar (*CallCharMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jchar (*CallCharMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jchar (*CallCharMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jshort (*CallShortMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jshort (*CallShortMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jshort (*CallShortMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jint (*CallIntMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jint (*CallIntMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jint (*CallIntMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jlong (*CallLongMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jlong (*CallLongMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jlong (*CallLongMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jfloat (*CallFloatMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jfloat (*CallFloatMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jfloat (*CallFloatMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jdouble (*CallDoubleMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
jdouble (*CallDoubleMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
jdouble (*CallDoubleMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
void (*CallVoidMethod) (JNIEnv *, jobject, jmethodID,
|
||||
...);
|
||||
void (*CallVoidMethodV) (JNIEnv *, jobject, jmethodID,
|
||||
_Jv_va_list);
|
||||
void (*CallVoidMethodA) (JNIEnv *, jobject, jmethodID,
|
||||
jvalue *);
|
||||
jobject (JNICALL *GetObjectField) (JNIEnv *, jobject, jfieldID);
|
||||
jboolean (JNICALL *GetBooleanField) (JNIEnv *, jobject, jfieldID);
|
||||
jbyte (JNICALL *GetByteField) (JNIEnv *, jobject, jfieldID);
|
||||
jchar (JNICALL *GetCharField) (JNIEnv *, jobject, jfieldID);
|
||||
jshort (JNICALL *GetShortField) (JNIEnv *, jobject, jfieldID);
|
||||
jint (JNICALL *GetIntField) (JNIEnv *, jobject, jfieldID);
|
||||
jlong (JNICALL *GetLongField) (JNIEnv *, jobject, jfieldID);
|
||||
jfloat (JNICALL *GetFloatField) (JNIEnv *, jobject, jfieldID);
|
||||
jdouble (JNICALL *GetDoubleField) (JNIEnv *, jobject, jfieldID);
|
||||
|
||||
jobject (*CallNonvirtualObjectMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jobject (*CallNonvirtualObjectMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jobject (*CallNonvirtualObjectMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jboolean (*CallNonvirtualBooleanMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jboolean (*CallNonvirtualBooleanMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jboolean (*CallNonvirtualBooleanMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jbyte (*CallNonvirtualByteMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jbyte (*CallNonvirtualByteMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jbyte (*CallNonvirtualByteMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jchar (*CallNonvirtualCharMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jchar (*CallNonvirtualCharMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jchar (*CallNonvirtualCharMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jshort (*CallNonvirtualShortMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jshort (*CallNonvirtualShortMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jshort (*CallNonvirtualShortMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jint (*CallNonvirtualIntMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jint (*CallNonvirtualIntMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jint (*CallNonvirtualIntMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jlong (*CallNonvirtualLongMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jlong (*CallNonvirtualLongMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jlong (*CallNonvirtualLongMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jfloat (*CallNonvirtualFloatMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jfloat (*CallNonvirtualFloatMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jfloat (*CallNonvirtualFloatMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
jdouble (*CallNonvirtualDoubleMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
jdouble (*CallNonvirtualDoubleMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
jdouble (*CallNonvirtualDoubleMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
void (*CallNonvirtualVoidMethod) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, ...);
|
||||
void (*CallNonvirtualVoidMethodV) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, _Jv_va_list);
|
||||
void (*CallNonvirtualVoidMethodA) (JNIEnv *, jobject, jclass,
|
||||
jmethodID, jvalue *);
|
||||
|
||||
jfieldID (*GetFieldID) (JNIEnv *, jclass, const char *,
|
||||
const char *);
|
||||
|
||||
jobject (*GetObjectField) (JNIEnv *, jobject, jfieldID);
|
||||
jboolean (*GetBooleanField) (JNIEnv *, jobject, jfieldID);
|
||||
jbyte (*GetByteField) (JNIEnv *, jobject, jfieldID);
|
||||
jchar (*GetCharField) (JNIEnv *, jobject, jfieldID);
|
||||
jshort (*GetShortField) (JNIEnv *, jobject, jfieldID);
|
||||
jint (*GetIntField) (JNIEnv *, jobject, jfieldID);
|
||||
jlong (*GetLongField) (JNIEnv *, jobject, jfieldID);
|
||||
jfloat (*GetFloatField) (JNIEnv *, jobject, jfieldID);
|
||||
jdouble (*GetDoubleField) (JNIEnv *, jobject, jfieldID);
|
||||
|
||||
void (*SetObjectField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetObjectField) (JNIEnv *, jobject,
|
||||
jfieldID, jobject);
|
||||
void (*SetBooleanField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetBooleanField) (JNIEnv *, jobject,
|
||||
jfieldID, jboolean);
|
||||
void (*SetByteField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetByteField) (JNIEnv *, jobject,
|
||||
jfieldID, jbyte);
|
||||
void (*SetCharField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetCharField) (JNIEnv *, jobject,
|
||||
jfieldID, jchar);
|
||||
void (*SetShortField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetShortField) (JNIEnv *, jobject,
|
||||
jfieldID, jshort);
|
||||
void (*SetIntField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetIntField) (JNIEnv *, jobject,
|
||||
jfieldID, jint);
|
||||
void (*SetLongField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetLongField) (JNIEnv *, jobject,
|
||||
jfieldID, jlong);
|
||||
void (*SetFloatField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetFloatField) (JNIEnv *, jobject,
|
||||
jfieldID, jfloat);
|
||||
void (*SetDoubleField) (JNIEnv *, jobject,
|
||||
void (JNICALL *SetDoubleField) (JNIEnv *, jobject,
|
||||
jfieldID, jdouble);
|
||||
|
||||
jmethodID (*GetStaticMethodID) (JNIEnv *, jclass, const char *,
|
||||
jmethodID (JNICALL *GetStaticMethodID) (JNIEnv *, jclass, const char *,
|
||||
const char *);
|
||||
|
||||
jobject (*CallStaticObjectMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jobject (*CallStaticObjectMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jobject (*CallStaticObjectMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jboolean (*CallStaticBooleanMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jboolean (*CallStaticBooleanMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jboolean (*CallStaticBooleanMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jbyte (*CallStaticByteMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jbyte (*CallStaticByteMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jbyte (*CallStaticByteMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jchar (*CallStaticCharMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jchar (*CallStaticCharMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jchar (*CallStaticCharMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jshort (*CallStaticShortMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jshort (*CallStaticShortMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jshort (*CallStaticShortMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jint (*CallStaticIntMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jint (*CallStaticIntMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jint (*CallStaticIntMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jlong (*CallStaticLongMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jlong (*CallStaticLongMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jlong (*CallStaticLongMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jfloat (*CallStaticFloatMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jfloat (*CallStaticFloatMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jfloat (*CallStaticFloatMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jdouble (*CallStaticDoubleMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jdouble (*CallStaticDoubleMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jdouble (*CallStaticDoubleMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
void (*CallStaticVoidMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
void (*CallStaticVoidMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
void (*CallStaticVoidMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jobject (JNICALL *CallStaticObjectMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jobject (JNICALL *CallStaticObjectMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jobject (JNICALL *CallStaticObjectMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jboolean (JNICALL *CallStaticBooleanMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jboolean (JNICALL *CallStaticBooleanMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jboolean (JNICALL *CallStaticBooleanMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jbyte (JNICALL *CallStaticByteMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jbyte (JNICALL *CallStaticByteMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jbyte (JNICALL *CallStaticByteMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jchar (JNICALL *CallStaticCharMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jchar (JNICALL *CallStaticCharMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jchar (JNICALL *CallStaticCharMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jshort (JNICALL *CallStaticShortMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jshort (JNICALL *CallStaticShortMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jshort (JNICALL *CallStaticShortMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jint (JNICALL *CallStaticIntMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jint (JNICALL *CallStaticIntMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jint (JNICALL *CallStaticIntMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jlong (JNICALL *CallStaticLongMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jlong (JNICALL *CallStaticLongMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jlong (JNICALL *CallStaticLongMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jfloat (JNICALL *CallStaticFloatMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jfloat (JNICALL *CallStaticFloatMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jfloat (JNICALL *CallStaticFloatMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
jdouble (JNICALL *CallStaticDoubleMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
jdouble (JNICALL *CallStaticDoubleMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
jdouble (JNICALL *CallStaticDoubleMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
void (JNICALL *CallStaticVoidMethod) (JNIEnv *, jclass, jmethodID,
|
||||
...);
|
||||
void (JNICALL *CallStaticVoidMethodV) (JNIEnv *, jclass, jmethodID,
|
||||
_Jv_va_list);
|
||||
void (JNICALL *CallStaticVoidMethodA) (JNIEnv *, jclass, jmethodID,
|
||||
jvalue *);
|
||||
|
||||
jfieldID (*GetStaticFieldID) (JNIEnv *, jclass, const char *,
|
||||
const char *);
|
||||
jfieldID (JNICALL *GetStaticFieldID) (JNIEnv *, jclass, const char *,
|
||||
const char *);
|
||||
|
||||
jobject (*GetStaticObjectField) (JNIEnv *, jclass, jfieldID);
|
||||
jboolean (*GetStaticBooleanField) (JNIEnv *, jclass, jfieldID);
|
||||
jbyte (*GetStaticByteField) (JNIEnv *, jclass, jfieldID);
|
||||
jchar (*GetStaticCharField) (JNIEnv *, jclass, jfieldID);
|
||||
jshort (*GetStaticShortField) (JNIEnv *, jclass, jfieldID);
|
||||
jint (*GetStaticIntField) (JNIEnv *, jclass, jfieldID);
|
||||
jlong (*GetStaticLongField) (JNIEnv *, jclass, jfieldID);
|
||||
jfloat (*GetStaticFloatField) (JNIEnv *, jclass, jfieldID);
|
||||
jdouble (*GetStaticDoubleField) (JNIEnv *, jclass, jfieldID);
|
||||
jobject (JNICALL *GetStaticObjectField) (JNIEnv *, jclass, jfieldID);
|
||||
jboolean (JNICALL *GetStaticBooleanField) (JNIEnv *, jclass, jfieldID);
|
||||
jbyte (JNICALL *GetStaticByteField) (JNIEnv *, jclass, jfieldID);
|
||||
jchar (JNICALL *GetStaticCharField) (JNIEnv *, jclass, jfieldID);
|
||||
jshort (JNICALL *GetStaticShortField) (JNIEnv *, jclass, jfieldID);
|
||||
jint (JNICALL *GetStaticIntField) (JNIEnv *, jclass, jfieldID);
|
||||
jlong (JNICALL *GetStaticLongField) (JNIEnv *, jclass, jfieldID);
|
||||
jfloat (JNICALL *GetStaticFloatField) (JNIEnv *, jclass, jfieldID);
|
||||
jdouble (JNICALL *GetStaticDoubleField) (JNIEnv *, jclass, jfieldID);
|
||||
|
||||
void (*SetStaticObjectField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticObjectField) (JNIEnv *, jclass,
|
||||
jfieldID, jobject);
|
||||
void (*SetStaticBooleanField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticBooleanField) (JNIEnv *, jclass,
|
||||
jfieldID, jboolean);
|
||||
void (*SetStaticByteField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticByteField) (JNIEnv *, jclass,
|
||||
jfieldID, jbyte);
|
||||
void (*SetStaticCharField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticCharField) (JNIEnv *, jclass,
|
||||
jfieldID, jchar);
|
||||
void (*SetStaticShortField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticShortField) (JNIEnv *, jclass,
|
||||
jfieldID, jshort);
|
||||
void (*SetStaticIntField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticIntField) (JNIEnv *, jclass,
|
||||
jfieldID, jint);
|
||||
void (*SetStaticLongField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticLongField) (JNIEnv *, jclass,
|
||||
jfieldID, jlong);
|
||||
void (*SetStaticFloatField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticFloatField) (JNIEnv *, jclass,
|
||||
jfieldID, jfloat);
|
||||
void (*SetStaticDoubleField) (JNIEnv *, jclass,
|
||||
void (JNICALL *SetStaticDoubleField) (JNIEnv *, jclass,
|
||||
jfieldID, jdouble);
|
||||
|
||||
jstring (*NewString) (JNIEnv *, const jchar *, jsize);
|
||||
jsize (*GetStringLength) (JNIEnv *, jstring);
|
||||
const jchar * (*GetStringChars) (JNIEnv *, jstring, jboolean *);
|
||||
void (*ReleaseStringChars) (JNIEnv *, jstring, const jchar *);
|
||||
jstring (*NewStringUTF) (JNIEnv *, const char *);
|
||||
jsize (*GetStringUTFLength) (JNIEnv *, jstring);
|
||||
const char * (*GetStringUTFChars) (JNIEnv *, jstring, jboolean *);
|
||||
void (*ReleaseStringUTFChars) (JNIEnv *, jstring, const char *);
|
||||
jsize (*GetArrayLength) (JNIEnv *, jarray);
|
||||
jarray (*NewObjectArray) (JNIEnv *, jsize, jclass, jobject);
|
||||
jobject (*GetObjectArrayElement) (JNIEnv *, jobjectArray, jsize);
|
||||
void (*SetObjectArrayElement) (JNIEnv *, jobjectArray, jsize,
|
||||
jobject);
|
||||
jstring (JNICALL *NewString) (JNIEnv *, const jchar *, jsize);
|
||||
jsize (JNICALL *GetStringLength) (JNIEnv *, jstring);
|
||||
const jchar * (JNICALL *GetStringChars) (JNIEnv *, jstring, jboolean *);
|
||||
void (JNICALL *ReleaseStringChars) (JNIEnv *, jstring, const jchar *);
|
||||
jstring (JNICALL *NewStringUTF) (JNIEnv *, const char *);
|
||||
jsize (JNICALL *GetStringUTFLength) (JNIEnv *, jstring);
|
||||
const char * (JNICALL *GetStringUTFChars) (JNIEnv *, jstring, jboolean *);
|
||||
void (JNICALL *ReleaseStringUTFChars) (JNIEnv *, jstring, const char *);
|
||||
jsize (JNICALL *GetArrayLength) (JNIEnv *, jarray);
|
||||
jarray (JNICALL *NewObjectArray) (JNIEnv *, jsize, jclass, jobject);
|
||||
jobject (JNICALL *GetObjectArrayElement) (JNIEnv *, jobjectArray, jsize);
|
||||
void (JNICALL *SetObjectArrayElement) (JNIEnv *, jobjectArray, jsize,
|
||||
jobject);
|
||||
|
||||
jbooleanArray (*NewBooleanArray) (JNIEnv *, jsize);
|
||||
jbyteArray (*NewByteArray) (JNIEnv *, jsize);
|
||||
jcharArray (*NewCharArray) (JNIEnv *, jsize);
|
||||
jshortArray (*NewShortArray) (JNIEnv *, jsize);
|
||||
jintArray (*NewIntArray) (JNIEnv *, jsize);
|
||||
jlongArray (*NewLongArray) (JNIEnv *, jsize);
|
||||
jfloatArray (*NewFloatArray) (JNIEnv *, jsize);
|
||||
jdoubleArray (*NewDoubleArray) (JNIEnv *, jsize);
|
||||
jbooleanArray (JNICALL *NewBooleanArray) (JNIEnv *, jsize);
|
||||
jbyteArray (JNICALL *NewByteArray) (JNIEnv *, jsize);
|
||||
jcharArray (JNICALL *NewCharArray) (JNIEnv *, jsize);
|
||||
jshortArray (JNICALL *NewShortArray) (JNIEnv *, jsize);
|
||||
jintArray (JNICALL *NewIntArray) (JNIEnv *, jsize);
|
||||
jlongArray (JNICALL *NewLongArray) (JNIEnv *, jsize);
|
||||
jfloatArray (JNICALL *NewFloatArray) (JNIEnv *, jsize);
|
||||
jdoubleArray (JNICALL *NewDoubleArray) (JNIEnv *, jsize);
|
||||
|
||||
jboolean * (*GetBooleanArrayElements) (JNIEnv *, jbooleanArray,
|
||||
jboolean *);
|
||||
jbyte * (*GetByteArrayElements) (JNIEnv *, jbyteArray,
|
||||
jboolean *);
|
||||
jchar * (*GetCharArrayElements) (JNIEnv *, jcharArray,
|
||||
jboolean *);
|
||||
jshort * (*GetShortArrayElements) (JNIEnv *, jshortArray,
|
||||
jboolean *);
|
||||
jint * (*GetIntArrayElements) (JNIEnv *, jintArray,
|
||||
jboolean *);
|
||||
jlong * (*GetLongArrayElements) (JNIEnv *, jlongArray,
|
||||
jboolean *);
|
||||
jfloat * (*GetFloatArrayElements) (JNIEnv *, jfloatArray,
|
||||
jboolean *);
|
||||
jdouble * (*GetDoubleArrayElements) (JNIEnv *, jdoubleArray,
|
||||
jboolean *);
|
||||
jboolean * (JNICALL *GetBooleanArrayElements) (JNIEnv *, jbooleanArray,
|
||||
jboolean *);
|
||||
jbyte * (JNICALL *GetByteArrayElements) (JNIEnv *, jbyteArray,
|
||||
jboolean *);
|
||||
jchar * (JNICALL *GetCharArrayElements) (JNIEnv *, jcharArray,
|
||||
jboolean *);
|
||||
jshort * (JNICALL *GetShortArrayElements) (JNIEnv *, jshortArray,
|
||||
jboolean *);
|
||||
jint * (JNICALL *GetIntArrayElements) (JNIEnv *, jintArray,
|
||||
jboolean *);
|
||||
jlong * (JNICALL *GetLongArrayElements) (JNIEnv *, jlongArray,
|
||||
jboolean *);
|
||||
jfloat * (JNICALL *GetFloatArrayElements) (JNIEnv *, jfloatArray,
|
||||
jboolean *);
|
||||
jdouble * (JNICALL *GetDoubleArrayElements) (JNIEnv *, jdoubleArray,
|
||||
jboolean *);
|
||||
|
||||
void (*ReleaseBooleanArrayElements) (JNIEnv *, jbooleanArray,
|
||||
jboolean *, jint);
|
||||
void (*ReleaseByteArrayElements) (JNIEnv *, jbyteArray,
|
||||
jbyte *, jint);
|
||||
void (*ReleaseCharArrayElements) (JNIEnv *, jcharArray,
|
||||
jchar *, jint);
|
||||
void (*ReleaseShortArrayElements) (JNIEnv *, jshortArray,
|
||||
jshort *, jint);
|
||||
void (*ReleaseIntArrayElements) (JNIEnv *, jintArray,
|
||||
jint *, jint);
|
||||
void (*ReleaseLongArrayElements) (JNIEnv *, jlongArray,
|
||||
jlong *, jint);
|
||||
void (*ReleaseFloatArrayElements) (JNIEnv *, jfloatArray,
|
||||
jfloat *, jint);
|
||||
void (*ReleaseDoubleArrayElements) (JNIEnv *, jdoubleArray,
|
||||
jdouble *, jint);
|
||||
void (JNICALL *ReleaseBooleanArrayElements) (JNIEnv *, jbooleanArray,
|
||||
jboolean *, jint);
|
||||
void (JNICALL *ReleaseByteArrayElements) (JNIEnv *, jbyteArray,
|
||||
jbyte *, jint);
|
||||
void (JNICALL *ReleaseCharArrayElements) (JNIEnv *, jcharArray,
|
||||
jchar *, jint);
|
||||
void (JNICALL *ReleaseShortArrayElements) (JNIEnv *, jshortArray,
|
||||
jshort *, jint);
|
||||
void (JNICALL *ReleaseIntArrayElements) (JNIEnv *, jintArray,
|
||||
jint *, jint);
|
||||
void (JNICALL *ReleaseLongArrayElements) (JNIEnv *, jlongArray,
|
||||
jlong *, jint);
|
||||
void (JNICALL *ReleaseFloatArrayElements) (JNIEnv *, jfloatArray,
|
||||
jfloat *, jint);
|
||||
void (JNICALL *ReleaseDoubleArrayElements) (JNIEnv *, jdoubleArray,
|
||||
jdouble *, jint);
|
||||
|
||||
void (*GetBooleanArrayRegion) (JNIEnv *, jbooleanArray,
|
||||
jsize, jsize, jboolean *);
|
||||
void (*GetByteArrayRegion) (JNIEnv *, jbyteArray,
|
||||
jsize, jsize, jbyte *);
|
||||
void (*GetCharArrayRegion) (JNIEnv *, jcharArray,
|
||||
jsize, jsize, jchar *);
|
||||
void (*GetShortArrayRegion) (JNIEnv *, jshortArray,
|
||||
jsize, jsize, jshort *);
|
||||
void (*GetIntArrayRegion) (JNIEnv *, jintArray,
|
||||
jsize, jsize, jint *);
|
||||
void (*GetLongArrayRegion) (JNIEnv *, jlongArray,
|
||||
jsize, jsize, jlong *);
|
||||
void (*GetFloatArrayRegion) (JNIEnv *, jfloatArray,
|
||||
jsize, jsize, jfloat *);
|
||||
void (*GetDoubleArrayRegion) (JNIEnv *, jdoubleArray,
|
||||
jsize, jsize, jdouble *);
|
||||
void (JNICALL *GetBooleanArrayRegion) (JNIEnv *, jbooleanArray,
|
||||
jsize, jsize, jboolean *);
|
||||
void (JNICALL *GetByteArrayRegion) (JNIEnv *, jbyteArray,
|
||||
jsize, jsize, jbyte *);
|
||||
void (JNICALL *GetCharArrayRegion) (JNIEnv *, jcharArray,
|
||||
jsize, jsize, jchar *);
|
||||
void (JNICALL *GetShortArrayRegion) (JNIEnv *, jshortArray,
|
||||
jsize, jsize, jshort *);
|
||||
void (JNICALL *GetIntArrayRegion) (JNIEnv *, jintArray,
|
||||
jsize, jsize, jint *);
|
||||
void (JNICALL *GetLongArrayRegion) (JNIEnv *, jlongArray,
|
||||
jsize, jsize, jlong *);
|
||||
void (JNICALL *GetFloatArrayRegion) (JNIEnv *, jfloatArray,
|
||||
jsize, jsize, jfloat *);
|
||||
void (JNICALL *GetDoubleArrayRegion) (JNIEnv *, jdoubleArray,
|
||||
jsize, jsize, jdouble *);
|
||||
|
||||
void (*SetBooleanArrayRegion) (JNIEnv *, jbooleanArray,
|
||||
jsize, jsize, jboolean *);
|
||||
void (*SetByteArrayRegion) (JNIEnv *, jbyteArray,
|
||||
jsize, jsize, jbyte *);
|
||||
void (*SetCharArrayRegion) (JNIEnv *, jcharArray,
|
||||
jsize, jsize, jchar *);
|
||||
void (*SetShortArrayRegion) (JNIEnv *, jshortArray,
|
||||
jsize, jsize, jshort *);
|
||||
void (*SetIntArrayRegion) (JNIEnv *, jintArray,
|
||||
jsize, jsize, jint *);
|
||||
void (*SetLongArrayRegion) (JNIEnv *, jlongArray,
|
||||
jsize, jsize, jlong *);
|
||||
void (*SetFloatArrayRegion) (JNIEnv *, jfloatArray,
|
||||
jsize, jsize, jfloat *);
|
||||
void (*SetDoubleArrayRegion) (JNIEnv *, jdoubleArray,
|
||||
jsize, jsize, jdouble *);
|
||||
void (JNICALL *SetBooleanArrayRegion) (JNIEnv *, jbooleanArray,
|
||||
jsize, jsize, jboolean *);
|
||||
void (JNICALL *SetByteArrayRegion) (JNIEnv *, jbyteArray,
|
||||
jsize, jsize, jbyte *);
|
||||
void (JNICALL *SetCharArrayRegion) (JNIEnv *, jcharArray,
|
||||
jsize, jsize, jchar *);
|
||||
void (JNICALL *SetShortArrayRegion) (JNIEnv *, jshortArray,
|
||||
jsize, jsize, jshort *);
|
||||
void (JNICALL *SetIntArrayRegion) (JNIEnv *, jintArray,
|
||||
jsize, jsize, jint *);
|
||||
void (JNICALL *SetLongArrayRegion) (JNIEnv *, jlongArray,
|
||||
jsize, jsize, jlong *);
|
||||
void (JNICALL *SetFloatArrayRegion) (JNIEnv *, jfloatArray,
|
||||
jsize, jsize, jfloat *);
|
||||
void (JNICALL *SetDoubleArrayRegion) (JNIEnv *, jdoubleArray,
|
||||
jsize, jsize, jdouble *);
|
||||
|
||||
jint (*RegisterNatives) (JNIEnv *, jclass,
|
||||
const JNINativeMethod *, jint);
|
||||
jint (*UnregisterNatives) (JNIEnv *, jclass);
|
||||
jint (*MonitorEnter) (JNIEnv *, jobject);
|
||||
jint (*MonitorExit) (JNIEnv *, jobject);
|
||||
jint (*GetJavaVM) (JNIEnv *, JavaVM **);
|
||||
jint (JNICALL *RegisterNatives) (JNIEnv *, jclass,
|
||||
const JNINativeMethod *,
|
||||
jint);
|
||||
jint (JNICALL *UnregisterNatives) (JNIEnv *, jclass);
|
||||
jint (JNICALL *MonitorEnter) (JNIEnv *, jobject);
|
||||
jint (JNICALL *MonitorExit) (JNIEnv *, jobject);
|
||||
jint (JNICALL *GetJavaVM) (JNIEnv *, JavaVM **);
|
||||
|
||||
void (*GetStringRegion) (JNIEnv *, jstring, jsize,
|
||||
jsize, jchar *);
|
||||
void (*GetStringUTFRegion) (JNIEnv *, jstring, jsize,
|
||||
jsize, char *);
|
||||
void (JNICALL *GetStringRegion) (JNIEnv *, jstring, jsize,
|
||||
jsize, jchar *);
|
||||
void (JNICALL *GetStringUTFRegion) (JNIEnv *, jstring, jsize,
|
||||
jsize, char *);
|
||||
|
||||
void * (*GetPrimitiveArrayCritical) (JNIEnv *, jarray, jboolean *);
|
||||
void (*ReleasePrimitiveArrayCritical) (JNIEnv *, jarray, void *, jint);
|
||||
void * (JNICALL *GetPrimitiveArrayCritical) (JNIEnv *, jarray,
|
||||
jboolean *);
|
||||
void (JNICALL *ReleasePrimitiveArrayCritical) (JNIEnv *, jarray, void *,
|
||||
jint);
|
||||
|
||||
const jchar * (*GetStringCritical) (JNIEnv *, jstring, jboolean *);
|
||||
void (*ReleaseStringCritical) (JNIEnv *, jstring, const jchar *);
|
||||
const jchar * (JNICALL *GetStringCritical) (JNIEnv *, jstring,
|
||||
jboolean *);
|
||||
void (JNICALL *ReleaseStringCritical) (JNIEnv *, jstring,
|
||||
const jchar *);
|
||||
|
||||
jweak (*NewWeakGlobalRef) (JNIEnv *, jobject);
|
||||
void (*DeleteWeakGlobalRef) (JNIEnv *, jweak);
|
||||
jweak (JNICALL *NewWeakGlobalRef) (JNIEnv *, jobject);
|
||||
void (JNICALL *DeleteWeakGlobalRef) (JNIEnv *, jweak);
|
||||
|
||||
jboolean (*ExceptionCheck) (JNIEnv *);
|
||||
jboolean (JNICALL *ExceptionCheck) (JNIEnv *);
|
||||
|
||||
jobject (*NewDirectByteBuffer) (JNIEnv *, void *, jlong);
|
||||
void * (*GetDirectBufferAddress) (JNIEnv *, jobject);
|
||||
jlong (*GetDirectBufferCapacity) (JNIEnv *, jobject);
|
||||
jobject (JNICALL *NewDirectByteBuffer) (JNIEnv *, void *, jlong);
|
||||
void * (JNICALL *GetDirectBufferAddress) (JNIEnv *, jobject);
|
||||
jlong (JNICALL *GetDirectBufferCapacity) (JNIEnv *, jobject);
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -1558,11 +1563,11 @@ struct JNIInvokeInterface
|
||||
_Jv_func reserved1;
|
||||
_Jv_func reserved2;
|
||||
|
||||
jint (*DestroyJavaVM) (JavaVM *);
|
||||
jint (*AttachCurrentThread) (JavaVM *, void **, void *);
|
||||
jint (*DetachCurrentThread) (JavaVM *);
|
||||
jint (*GetEnv) (JavaVM *, void **, jint);
|
||||
jint (*AttachCurrentThreadAsDaemon) (JavaVM *, void **, void *);
|
||||
jint (JNICALL *DestroyJavaVM) (JavaVM *);
|
||||
jint (JNICALL *AttachCurrentThread) (JavaVM *, void **, void *);
|
||||
jint (JNICALL *DetachCurrentThread) (JavaVM *);
|
||||
jint (JNICALL *GetEnv) (JavaVM *, void **, jint);
|
||||
jint (JNICALL *AttachCurrentThreadAsDaemon) (JavaVM *, void **, void *);
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
257
libjava/jni.cc
257
libjava/jni.cc
@ -217,7 +217,7 @@ unwrap (T *obj)
|
||||
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_NewGlobalRef (JNIEnv *, jobject obj)
|
||||
(JNICALL _Jv_JNI_NewGlobalRef) (JNIEnv *, jobject obj)
|
||||
{
|
||||
// This seems weird but I think it is correct.
|
||||
obj = unwrap (obj);
|
||||
@ -226,7 +226,7 @@ _Jv_JNI_NewGlobalRef (JNIEnv *, jobject obj)
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_DeleteGlobalRef (JNIEnv *, jobject obj)
|
||||
(JNICALL _Jv_JNI_DeleteGlobalRef) (JNIEnv *, jobject obj)
|
||||
{
|
||||
// This seems weird but I think it is correct.
|
||||
obj = unwrap (obj);
|
||||
@ -234,7 +234,7 @@ _Jv_JNI_DeleteGlobalRef (JNIEnv *, jobject obj)
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_DeleteLocalRef (JNIEnv *env, jobject obj)
|
||||
(JNICALL _Jv_JNI_DeleteLocalRef) (JNIEnv *env, jobject obj)
|
||||
{
|
||||
_Jv_JNI_LocalFrame *frame;
|
||||
|
||||
@ -261,7 +261,7 @@ _Jv_JNI_DeleteLocalRef (JNIEnv *env, jobject obj)
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_EnsureLocalCapacity (JNIEnv *env, jint size)
|
||||
(JNICALL _Jv_JNI_EnsureLocalCapacity) (JNIEnv *env, jint size)
|
||||
{
|
||||
// It is easier to just always allocate a new frame of the requested
|
||||
// size. This isn't the most efficient thing, but for now we don't
|
||||
@ -289,7 +289,7 @@ _Jv_JNI_EnsureLocalCapacity (JNIEnv *env, jint size)
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_PushLocalFrame (JNIEnv *env, jint size)
|
||||
(JNICALL _Jv_JNI_PushLocalFrame) (JNIEnv *env, jint size)
|
||||
{
|
||||
jint r = _Jv_JNI_EnsureLocalCapacity (env, size);
|
||||
if (r < 0)
|
||||
@ -302,7 +302,7 @@ _Jv_JNI_PushLocalFrame (JNIEnv *env, jint size)
|
||||
}
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_NewLocalRef (JNIEnv *env, jobject obj)
|
||||
(JNICALL _Jv_JNI_NewLocalRef) (JNIEnv *env, jobject obj)
|
||||
{
|
||||
// This seems weird but I think it is correct.
|
||||
obj = unwrap (obj);
|
||||
@ -343,7 +343,7 @@ _Jv_JNI_NewLocalRef (JNIEnv *env, jobject obj)
|
||||
}
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_PopLocalFrame (JNIEnv *env, jobject result, int stop)
|
||||
(JNICALL _Jv_JNI_PopLocalFrame) (JNIEnv *env, jobject result, int stop)
|
||||
{
|
||||
_Jv_JNI_LocalFrame *rf = env->locals;
|
||||
|
||||
@ -378,7 +378,7 @@ _Jv_JNI_PopLocalFrame (JNIEnv *env, jobject result, int stop)
|
||||
}
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_PopLocalFrame (JNIEnv *env, jobject result)
|
||||
(JNICALL _Jv_JNI_PopLocalFrame) (JNIEnv *env, jobject result)
|
||||
{
|
||||
return _Jv_JNI_PopLocalFrame (env, result, MARK_USER);
|
||||
}
|
||||
@ -422,14 +422,14 @@ wrap_value (JNIEnv *env, T *value)
|
||||
|
||||
|
||||
static jint
|
||||
_Jv_JNI_GetVersion (JNIEnv *)
|
||||
(JNICALL _Jv_JNI_GetVersion) (JNIEnv *)
|
||||
{
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
|
||||
static jclass
|
||||
_Jv_JNI_DefineClass (JNIEnv *env, jobject loader,
|
||||
const jbyte *buf, jsize bufLen)
|
||||
(JNICALL _Jv_JNI_DefineClass) (JNIEnv *env, jobject loader,
|
||||
const jbyte *buf, jsize bufLen)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -454,7 +454,7 @@ _Jv_JNI_DefineClass (JNIEnv *env, jobject loader,
|
||||
}
|
||||
|
||||
static jclass
|
||||
_Jv_JNI_FindClass (JNIEnv *env, const char *name)
|
||||
(JNICALL _Jv_JNI_FindClass) (JNIEnv *env, const char *name)
|
||||
{
|
||||
// FIXME: assume that NAME isn't too long.
|
||||
int len = strlen (name);
|
||||
@ -490,19 +490,19 @@ _Jv_JNI_FindClass (JNIEnv *env, const char *name)
|
||||
}
|
||||
|
||||
static jclass
|
||||
_Jv_JNI_GetSuperclass (JNIEnv *env, jclass clazz)
|
||||
(JNICALL _Jv_JNI_GetSuperclass) (JNIEnv *env, jclass clazz)
|
||||
{
|
||||
return (jclass) wrap_value (env, unwrap (clazz)->getSuperclass ());
|
||||
}
|
||||
|
||||
static jboolean
|
||||
_Jv_JNI_IsAssignableFrom(JNIEnv *, jclass clazz1, jclass clazz2)
|
||||
(JNICALL _Jv_JNI_IsAssignableFrom) (JNIEnv *, jclass clazz1, jclass clazz2)
|
||||
{
|
||||
return unwrap (clazz1)->isAssignableFrom (unwrap (clazz2));
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_Throw (JNIEnv *env, jthrowable obj)
|
||||
(JNICALL _Jv_JNI_Throw) (JNIEnv *env, jthrowable obj)
|
||||
{
|
||||
// We check in case the user did some funky cast.
|
||||
obj = unwrap (obj);
|
||||
@ -512,7 +512,7 @@ _Jv_JNI_Throw (JNIEnv *env, jthrowable obj)
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_ThrowNew (JNIEnv *env, jclass clazz, const char *message)
|
||||
(JNICALL _Jv_JNI_ThrowNew) (JNIEnv *env, jclass clazz, const char *message)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
@ -549,32 +549,32 @@ _Jv_JNI_ThrowNew (JNIEnv *env, jclass clazz, const char *message)
|
||||
}
|
||||
|
||||
static jthrowable
|
||||
_Jv_JNI_ExceptionOccurred (JNIEnv *env)
|
||||
(JNICALL _Jv_JNI_ExceptionOccurred) (JNIEnv *env)
|
||||
{
|
||||
return (jthrowable) wrap_value (env, env->ex);
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_ExceptionDescribe (JNIEnv *env)
|
||||
(JNICALL _Jv_JNI_ExceptionDescribe) (JNIEnv *env)
|
||||
{
|
||||
if (env->ex != NULL)
|
||||
env->ex->printStackTrace();
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_ExceptionClear (JNIEnv *env)
|
||||
(JNICALL _Jv_JNI_ExceptionClear) (JNIEnv *env)
|
||||
{
|
||||
env->ex = NULL;
|
||||
}
|
||||
|
||||
static jboolean
|
||||
_Jv_JNI_ExceptionCheck (JNIEnv *env)
|
||||
(JNICALL _Jv_JNI_ExceptionCheck) (JNIEnv *env)
|
||||
{
|
||||
return env->ex != NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_FatalError (JNIEnv *, const char *message)
|
||||
(JNICALL _Jv_JNI_FatalError) (JNIEnv *, const char *message)
|
||||
{
|
||||
JvFail (message);
|
||||
}
|
||||
@ -582,13 +582,13 @@ _Jv_JNI_FatalError (JNIEnv *, const char *message)
|
||||
|
||||
|
||||
static jboolean
|
||||
_Jv_JNI_IsSameObject (JNIEnv *, jobject obj1, jobject obj2)
|
||||
(JNICALL _Jv_JNI_IsSameObject) (JNIEnv *, jobject obj1, jobject obj2)
|
||||
{
|
||||
return unwrap (obj1) == unwrap (obj2);
|
||||
}
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_AllocObject (JNIEnv *env, jclass clazz)
|
||||
(JNICALL _Jv_JNI_AllocObject) (JNIEnv *env, jclass clazz)
|
||||
{
|
||||
jobject obj = NULL;
|
||||
using namespace java::lang::reflect;
|
||||
@ -611,7 +611,7 @@ _Jv_JNI_AllocObject (JNIEnv *env, jclass clazz)
|
||||
}
|
||||
|
||||
static jclass
|
||||
_Jv_JNI_GetObjectClass (JNIEnv *env, jobject obj)
|
||||
(JNICALL _Jv_JNI_GetObjectClass) (JNIEnv *env, jobject obj)
|
||||
{
|
||||
obj = unwrap (obj);
|
||||
JvAssert (obj);
|
||||
@ -619,7 +619,7 @@ _Jv_JNI_GetObjectClass (JNIEnv *env, jobject obj)
|
||||
}
|
||||
|
||||
static jboolean
|
||||
_Jv_JNI_IsInstanceOf (JNIEnv *, jobject obj, jclass clazz)
|
||||
(JNICALL _Jv_JNI_IsInstanceOf) (JNIEnv *, jobject obj, jclass clazz)
|
||||
{
|
||||
return unwrap (clazz)->isInstance(unwrap (obj));
|
||||
}
|
||||
@ -632,8 +632,8 @@ _Jv_JNI_IsInstanceOf (JNIEnv *, jobject obj, jclass clazz)
|
||||
|
||||
template<jboolean is_static>
|
||||
static jmethodID
|
||||
_Jv_JNI_GetAnyMethodID (JNIEnv *env, jclass clazz,
|
||||
const char *name, const char *sig)
|
||||
(JNICALL _Jv_JNI_GetAnyMethodID) (JNIEnv *env, jclass clazz,
|
||||
const char *name, const char *sig)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -728,8 +728,8 @@ array_from_valist (jvalue *values, JArray<jclass> *arg_types, va_list vargs)
|
||||
// constructor.
|
||||
template<typename T, invocation_type style>
|
||||
static T
|
||||
_Jv_JNI_CallAnyMethodV (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID id, va_list vargs)
|
||||
(JNICALL _Jv_JNI_CallAnyMethodV) (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID id, va_list vargs)
|
||||
{
|
||||
obj = unwrap (obj);
|
||||
klass = unwrap (klass);
|
||||
@ -776,8 +776,8 @@ _Jv_JNI_CallAnyMethodV (JNIEnv *env, jobject obj, jclass klass,
|
||||
|
||||
template<typename T, invocation_type style>
|
||||
static T
|
||||
_Jv_JNI_CallAnyMethod (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID method, ...)
|
||||
(JNICALL _Jv_JNI_CallAnyMethod) (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID method, ...)
|
||||
{
|
||||
va_list args;
|
||||
T result;
|
||||
@ -791,8 +791,8 @@ _Jv_JNI_CallAnyMethod (JNIEnv *env, jobject obj, jclass klass,
|
||||
|
||||
template<typename T, invocation_type style>
|
||||
static T
|
||||
_Jv_JNI_CallAnyMethodA (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID id, jvalue *args)
|
||||
(JNICALL _Jv_JNI_CallAnyMethodA) (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID id, jvalue *args)
|
||||
{
|
||||
obj = unwrap (obj);
|
||||
klass = unwrap (klass);
|
||||
@ -846,8 +846,8 @@ _Jv_JNI_CallAnyMethodA (JNIEnv *env, jobject obj, jclass klass,
|
||||
|
||||
template<invocation_type style>
|
||||
static void
|
||||
_Jv_JNI_CallAnyVoidMethodV (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID id, va_list vargs)
|
||||
(JNICALL _Jv_JNI_CallAnyVoidMethodV) (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID id, va_list vargs)
|
||||
{
|
||||
obj = unwrap (obj);
|
||||
klass = unwrap (klass);
|
||||
@ -887,8 +887,8 @@ _Jv_JNI_CallAnyVoidMethodV (JNIEnv *env, jobject obj, jclass klass,
|
||||
|
||||
template<invocation_type style>
|
||||
static void
|
||||
_Jv_JNI_CallAnyVoidMethod (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID method, ...)
|
||||
(JNICALL _Jv_JNI_CallAnyVoidMethod) (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID method, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
@ -899,8 +899,8 @@ _Jv_JNI_CallAnyVoidMethod (JNIEnv *env, jobject obj, jclass klass,
|
||||
|
||||
template<invocation_type style>
|
||||
static void
|
||||
_Jv_JNI_CallAnyVoidMethodA (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID id, jvalue *args)
|
||||
(JNICALL _Jv_JNI_CallAnyVoidMethodA) (JNIEnv *env, jobject obj, jclass klass,
|
||||
jmethodID id, jvalue *args)
|
||||
{
|
||||
if (style == normal)
|
||||
id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
|
||||
@ -943,7 +943,8 @@ _Jv_JNI_CallAnyVoidMethodA (JNIEnv *env, jobject obj, jclass klass,
|
||||
// the CallMethod family.
|
||||
template<typename T>
|
||||
static T
|
||||
_Jv_JNI_CallMethodV (JNIEnv *env, jobject obj, jmethodID id, va_list args)
|
||||
(JNICALL _Jv_JNI_CallMethodV) (JNIEnv *env, jobject obj,
|
||||
jmethodID id, va_list args)
|
||||
{
|
||||
return _Jv_JNI_CallAnyMethodV<T, normal> (env, obj, NULL, id, args);
|
||||
}
|
||||
@ -952,7 +953,7 @@ _Jv_JNI_CallMethodV (JNIEnv *env, jobject obj, jmethodID id, va_list args)
|
||||
// the CallMethod family.
|
||||
template<typename T>
|
||||
static T
|
||||
_Jv_JNI_CallMethod (JNIEnv *env, jobject obj, jmethodID id, ...)
|
||||
(JNICALL _Jv_JNI_CallMethod) (JNIEnv *env, jobject obj, jmethodID id, ...)
|
||||
{
|
||||
va_list args;
|
||||
T result;
|
||||
@ -968,19 +969,21 @@ _Jv_JNI_CallMethod (JNIEnv *env, jobject obj, jmethodID id, ...)
|
||||
// the CallMethod family.
|
||||
template<typename T>
|
||||
static T
|
||||
_Jv_JNI_CallMethodA (JNIEnv *env, jobject obj, jmethodID id, jvalue *args)
|
||||
(JNICALL _Jv_JNI_CallMethodA) (JNIEnv *env, jobject obj,
|
||||
jmethodID id, jvalue *args)
|
||||
{
|
||||
return _Jv_JNI_CallAnyMethodA<T, normal> (env, obj, NULL, id, args);
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_CallVoidMethodV (JNIEnv *env, jobject obj, jmethodID id, va_list args)
|
||||
(JNICALL _Jv_JNI_CallVoidMethodV) (JNIEnv *env, jobject obj,
|
||||
jmethodID id, va_list args)
|
||||
{
|
||||
_Jv_JNI_CallAnyVoidMethodV<normal> (env, obj, NULL, id, args);
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_CallVoidMethod (JNIEnv *env, jobject obj, jmethodID id, ...)
|
||||
(JNICALL _Jv_JNI_CallVoidMethod) (JNIEnv *env, jobject obj, jmethodID id, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
@ -990,7 +993,8 @@ _Jv_JNI_CallVoidMethod (JNIEnv *env, jobject obj, jmethodID id, ...)
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_CallVoidMethodA (JNIEnv *env, jobject obj, jmethodID id, jvalue *args)
|
||||
(JNICALL _Jv_JNI_CallVoidMethodA) (JNIEnv *env, jobject obj,
|
||||
jmethodID id, jvalue *args)
|
||||
{
|
||||
_Jv_JNI_CallAnyVoidMethodA<normal> (env, obj, NULL, id, args);
|
||||
}
|
||||
@ -999,8 +1003,8 @@ _Jv_JNI_CallVoidMethodA (JNIEnv *env, jobject obj, jmethodID id, jvalue *args)
|
||||
// the CallStaticMethod family.
|
||||
template<typename T>
|
||||
static T
|
||||
_Jv_JNI_CallStaticMethodV (JNIEnv *env, jclass klass,
|
||||
jmethodID id, va_list args)
|
||||
(JNICALL _Jv_JNI_CallStaticMethodV) (JNIEnv *env, jclass klass,
|
||||
jmethodID id, va_list args)
|
||||
{
|
||||
JvAssert (((id->accflags) & java::lang::reflect::Modifier::STATIC));
|
||||
JvAssert (java::lang::Class::class$.isInstance (unwrap (klass)));
|
||||
@ -1012,7 +1016,8 @@ _Jv_JNI_CallStaticMethodV (JNIEnv *env, jclass klass,
|
||||
// the CallStaticMethod family.
|
||||
template<typename T>
|
||||
static T
|
||||
_Jv_JNI_CallStaticMethod (JNIEnv *env, jclass klass, jmethodID id, ...)
|
||||
(JNICALL _Jv_JNI_CallStaticMethod) (JNIEnv *env, jclass klass,
|
||||
jmethodID id, ...)
|
||||
{
|
||||
va_list args;
|
||||
T result;
|
||||
@ -1032,8 +1037,8 @@ _Jv_JNI_CallStaticMethod (JNIEnv *env, jclass klass, jmethodID id, ...)
|
||||
// the CallStaticMethod family.
|
||||
template<typename T>
|
||||
static T
|
||||
_Jv_JNI_CallStaticMethodA (JNIEnv *env, jclass klass, jmethodID id,
|
||||
jvalue *args)
|
||||
(JNICALL _Jv_JNI_CallStaticMethodA) (JNIEnv *env, jclass klass, jmethodID id,
|
||||
jvalue *args)
|
||||
{
|
||||
JvAssert (((id->accflags) & java::lang::reflect::Modifier::STATIC));
|
||||
JvAssert (java::lang::Class::class$.isInstance (unwrap (klass)));
|
||||
@ -1042,14 +1047,15 @@ _Jv_JNI_CallStaticMethodA (JNIEnv *env, jclass klass, jmethodID id,
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_CallStaticVoidMethodV (JNIEnv *env, jclass klass, jmethodID id,
|
||||
va_list args)
|
||||
(JNICALL _Jv_JNI_CallStaticVoidMethodV) (JNIEnv *env, jclass klass,
|
||||
jmethodID id, va_list args)
|
||||
{
|
||||
_Jv_JNI_CallAnyVoidMethodV<static_type> (env, NULL, klass, id, args);
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_CallStaticVoidMethod (JNIEnv *env, jclass klass, jmethodID id, ...)
|
||||
(JNICALL _Jv_JNI_CallStaticVoidMethod) (JNIEnv *env, jclass klass,
|
||||
jmethodID id, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
@ -1059,15 +1065,15 @@ _Jv_JNI_CallStaticVoidMethod (JNIEnv *env, jclass klass, jmethodID id, ...)
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_CallStaticVoidMethodA (JNIEnv *env, jclass klass, jmethodID id,
|
||||
jvalue *args)
|
||||
(JNICALL _Jv_JNI_CallStaticVoidMethodA) (JNIEnv *env, jclass klass,
|
||||
jmethodID id, jvalue *args)
|
||||
{
|
||||
_Jv_JNI_CallAnyVoidMethodA<static_type> (env, NULL, klass, id, args);
|
||||
}
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_NewObjectV (JNIEnv *env, jclass klass,
|
||||
jmethodID id, va_list args)
|
||||
(JNICALL _Jv_JNI_NewObjectV) (JNIEnv *env, jclass klass,
|
||||
jmethodID id, va_list args)
|
||||
{
|
||||
JvAssert (klass && ! klass->isArray ());
|
||||
JvAssert (! strcmp (id->name->data, "<init>")
|
||||
@ -1081,7 +1087,7 @@ _Jv_JNI_NewObjectV (JNIEnv *env, jclass klass,
|
||||
}
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_NewObject (JNIEnv *env, jclass klass, jmethodID id, ...)
|
||||
(JNICALL _Jv_JNI_NewObject) (JNIEnv *env, jclass klass, jmethodID id, ...)
|
||||
{
|
||||
JvAssert (klass && ! klass->isArray ());
|
||||
JvAssert (! strcmp (id->name->data, "<init>")
|
||||
@ -1102,8 +1108,8 @@ _Jv_JNI_NewObject (JNIEnv *env, jclass klass, jmethodID id, ...)
|
||||
}
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_NewObjectA (JNIEnv *env, jclass klass, jmethodID id,
|
||||
jvalue *args)
|
||||
(JNICALL _Jv_JNI_NewObjectA) (JNIEnv *env, jclass klass, jmethodID id,
|
||||
jvalue *args)
|
||||
{
|
||||
JvAssert (klass && ! klass->isArray ());
|
||||
JvAssert (! strcmp (id->name->data, "<init>")
|
||||
@ -1120,7 +1126,7 @@ _Jv_JNI_NewObjectA (JNIEnv *env, jclass klass, jmethodID id,
|
||||
|
||||
template<typename T>
|
||||
static T
|
||||
_Jv_JNI_GetField (JNIEnv *env, jobject obj, jfieldID field)
|
||||
(JNICALL _Jv_JNI_GetField) (JNIEnv *env, jobject obj, jfieldID field)
|
||||
{
|
||||
obj = unwrap (obj);
|
||||
JvAssert (obj);
|
||||
@ -1130,7 +1136,7 @@ _Jv_JNI_GetField (JNIEnv *env, jobject obj, jfieldID field)
|
||||
|
||||
template<typename T>
|
||||
static void
|
||||
_Jv_JNI_SetField (JNIEnv *, jobject obj, jfieldID field, T value)
|
||||
(JNICALL _Jv_JNI_SetField) (JNIEnv *, jobject obj, jfieldID field, T value)
|
||||
{
|
||||
obj = unwrap (obj);
|
||||
value = unwrap (value);
|
||||
@ -1142,8 +1148,8 @@ _Jv_JNI_SetField (JNIEnv *, jobject obj, jfieldID field, T value)
|
||||
|
||||
template<jboolean is_static>
|
||||
static jfieldID
|
||||
_Jv_JNI_GetAnyFieldID (JNIEnv *env, jclass clazz,
|
||||
const char *name, const char *sig)
|
||||
(JNICALL _Jv_JNI_GetAnyFieldID) (JNIEnv *env, jclass clazz,
|
||||
const char *name, const char *sig)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1203,7 +1209,7 @@ _Jv_JNI_GetAnyFieldID (JNIEnv *env, jclass clazz,
|
||||
|
||||
template<typename T>
|
||||
static T
|
||||
_Jv_JNI_GetStaticField (JNIEnv *env, jclass, jfieldID field)
|
||||
(JNICALL _Jv_JNI_GetStaticField) (JNIEnv *env, jclass, jfieldID field)
|
||||
{
|
||||
T *ptr = (T *) field->u.addr;
|
||||
return wrap_value (env, *ptr);
|
||||
@ -1211,7 +1217,7 @@ _Jv_JNI_GetStaticField (JNIEnv *env, jclass, jfieldID field)
|
||||
|
||||
template<typename T>
|
||||
static void
|
||||
_Jv_JNI_SetStaticField (JNIEnv *, jclass, jfieldID field, T value)
|
||||
(JNICALL _Jv_JNI_SetStaticField) (JNIEnv *, jclass, jfieldID field, T value)
|
||||
{
|
||||
value = unwrap (value);
|
||||
T *ptr = (T *) field->u.addr;
|
||||
@ -1219,7 +1225,7 @@ _Jv_JNI_SetStaticField (JNIEnv *, jclass, jfieldID field, T value)
|
||||
}
|
||||
|
||||
static jstring
|
||||
_Jv_JNI_NewString (JNIEnv *env, const jchar *unichars, jsize len)
|
||||
(JNICALL _Jv_JNI_NewString) (JNIEnv *env, const jchar *unichars, jsize len)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1234,13 +1240,13 @@ _Jv_JNI_NewString (JNIEnv *env, const jchar *unichars, jsize len)
|
||||
}
|
||||
|
||||
static jsize
|
||||
_Jv_JNI_GetStringLength (JNIEnv *, jstring string)
|
||||
(JNICALL _Jv_JNI_GetStringLength) (JNIEnv *, jstring string)
|
||||
{
|
||||
return unwrap (string)->length();
|
||||
}
|
||||
|
||||
static const jchar *
|
||||
_Jv_JNI_GetStringChars (JNIEnv *, jstring string, jboolean *isCopy)
|
||||
(JNICALL _Jv_JNI_GetStringChars) (JNIEnv *, jstring string, jboolean *isCopy)
|
||||
{
|
||||
string = unwrap (string);
|
||||
jchar *result = _Jv_GetStringChars (string);
|
||||
@ -1251,13 +1257,13 @@ _Jv_JNI_GetStringChars (JNIEnv *, jstring string, jboolean *isCopy)
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_ReleaseStringChars (JNIEnv *, jstring string, const jchar *)
|
||||
(JNICALL _Jv_JNI_ReleaseStringChars) (JNIEnv *, jstring string, const jchar *)
|
||||
{
|
||||
unmark_for_gc (unwrap (string), global_ref_table);
|
||||
}
|
||||
|
||||
static jstring
|
||||
_Jv_JNI_NewStringUTF (JNIEnv *env, const char *bytes)
|
||||
(JNICALL _Jv_JNI_NewStringUTF) (JNIEnv *env, const char *bytes)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1272,13 +1278,14 @@ _Jv_JNI_NewStringUTF (JNIEnv *env, const char *bytes)
|
||||
}
|
||||
|
||||
static jsize
|
||||
_Jv_JNI_GetStringUTFLength (JNIEnv *, jstring string)
|
||||
(JNICALL _Jv_JNI_GetStringUTFLength) (JNIEnv *, jstring string)
|
||||
{
|
||||
return JvGetStringUTFLength (unwrap (string));
|
||||
}
|
||||
|
||||
static const char *
|
||||
_Jv_JNI_GetStringUTFChars (JNIEnv *env, jstring string, jboolean *isCopy)
|
||||
(JNICALL _Jv_JNI_GetStringUTFChars) (JNIEnv *env, jstring string,
|
||||
jboolean *isCopy)
|
||||
{
|
||||
string = unwrap (string);
|
||||
jsize len = JvGetStringUTFLength (string);
|
||||
@ -1301,14 +1308,14 @@ _Jv_JNI_GetStringUTFChars (JNIEnv *env, jstring string, jboolean *isCopy)
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_ReleaseStringUTFChars (JNIEnv *, jstring, const char *utf)
|
||||
(JNICALL _Jv_JNI_ReleaseStringUTFChars) (JNIEnv *, jstring, const char *utf)
|
||||
{
|
||||
_Jv_Free ((void *) utf);
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_GetStringRegion (JNIEnv *env, jstring string, jsize start, jsize len,
|
||||
jchar *buf)
|
||||
(JNICALL _Jv_JNI_GetStringRegion) (JNIEnv *env, jstring string, jsize start,
|
||||
jsize len, jchar *buf)
|
||||
{
|
||||
string = unwrap (string);
|
||||
jchar *result = _Jv_GetStringChars (string);
|
||||
@ -1329,8 +1336,8 @@ _Jv_JNI_GetStringRegion (JNIEnv *env, jstring string, jsize start, jsize len,
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_GetStringUTFRegion (JNIEnv *env, jstring str, jsize start,
|
||||
jsize len, char *buf)
|
||||
(JNICALL _Jv_JNI_GetStringUTFRegion) (JNIEnv *env, jstring str, jsize start,
|
||||
jsize len, char *buf)
|
||||
{
|
||||
str = unwrap (str);
|
||||
|
||||
@ -1351,7 +1358,7 @@ _Jv_JNI_GetStringUTFRegion (JNIEnv *env, jstring str, jsize start,
|
||||
}
|
||||
|
||||
static const jchar *
|
||||
_Jv_JNI_GetStringCritical (JNIEnv *, jstring str, jboolean *isCopy)
|
||||
(JNICALL _Jv_JNI_GetStringCritical) (JNIEnv *, jstring str, jboolean *isCopy)
|
||||
{
|
||||
jchar *result = _Jv_GetStringChars (unwrap (str));
|
||||
if (isCopy)
|
||||
@ -1360,20 +1367,20 @@ _Jv_JNI_GetStringCritical (JNIEnv *, jstring str, jboolean *isCopy)
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_ReleaseStringCritical (JNIEnv *, jstring, const jchar *)
|
||||
(JNICALL _Jv_JNI_ReleaseStringCritical) (JNIEnv *, jstring, const jchar *)
|
||||
{
|
||||
// Nothing.
|
||||
}
|
||||
|
||||
static jsize
|
||||
_Jv_JNI_GetArrayLength (JNIEnv *, jarray array)
|
||||
(JNICALL _Jv_JNI_GetArrayLength) (JNIEnv *, jarray array)
|
||||
{
|
||||
return unwrap (array)->length;
|
||||
}
|
||||
|
||||
static jarray
|
||||
_Jv_JNI_NewObjectArray (JNIEnv *env, jsize length, jclass elementClass,
|
||||
jobject init)
|
||||
(JNICALL _Jv_JNI_NewObjectArray) (JNIEnv *env, jsize length,
|
||||
jclass elementClass, jobject init)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1391,15 +1398,16 @@ _Jv_JNI_NewObjectArray (JNIEnv *env, jsize length, jclass elementClass,
|
||||
}
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_GetObjectArrayElement (JNIEnv *env, jobjectArray array, jsize index)
|
||||
(JNICALL _Jv_JNI_GetObjectArrayElement) (JNIEnv *env, jobjectArray array,
|
||||
jsize index)
|
||||
{
|
||||
jobject *elts = elements (unwrap (array));
|
||||
return wrap_value (env, elts[index]);
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_SetObjectArrayElement (JNIEnv *env, jobjectArray array, jsize index,
|
||||
jobject value)
|
||||
(JNICALL _Jv_JNI_SetObjectArrayElement) (JNIEnv *env, jobjectArray array,
|
||||
jsize index, jobject value)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1418,7 +1426,7 @@ _Jv_JNI_SetObjectArrayElement (JNIEnv *env, jobjectArray array, jsize index,
|
||||
|
||||
template<typename T, jclass K>
|
||||
static JArray<T> *
|
||||
_Jv_JNI_NewPrimitiveArray (JNIEnv *env, jsize length)
|
||||
(JNICALL _Jv_JNI_NewPrimitiveArray) (JNIEnv *env, jsize length)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1433,8 +1441,8 @@ _Jv_JNI_NewPrimitiveArray (JNIEnv *env, jsize length)
|
||||
|
||||
template<typename T>
|
||||
static T *
|
||||
_Jv_JNI_GetPrimitiveArrayElements (JNIEnv *, JArray<T> *array,
|
||||
jboolean *isCopy)
|
||||
(JNICALL _Jv_JNI_GetPrimitiveArrayElements) (JNIEnv *, JArray<T> *array,
|
||||
jboolean *isCopy)
|
||||
{
|
||||
array = unwrap (array);
|
||||
T *elts = elements (array);
|
||||
@ -1449,8 +1457,8 @@ _Jv_JNI_GetPrimitiveArrayElements (JNIEnv *, JArray<T> *array,
|
||||
|
||||
template<typename T>
|
||||
static void
|
||||
_Jv_JNI_ReleasePrimitiveArrayElements (JNIEnv *, JArray<T> *array,
|
||||
T *, jint /* mode */)
|
||||
(JNICALL _Jv_JNI_ReleasePrimitiveArrayElements) (JNIEnv *, JArray<T> *array,
|
||||
T *, jint /* mode */)
|
||||
{
|
||||
array = unwrap (array);
|
||||
// Note that we ignore MODE. We can do this because we never copy
|
||||
@ -1461,8 +1469,8 @@ _Jv_JNI_ReleasePrimitiveArrayElements (JNIEnv *, JArray<T> *array,
|
||||
|
||||
template<typename T>
|
||||
static void
|
||||
_Jv_JNI_GetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array,
|
||||
jsize start, jsize len,
|
||||
(JNICALL _Jv_JNI_GetPrimitiveArrayRegion) (JNIEnv *env, JArray<T> *array,
|
||||
jsize start, jsize len,
|
||||
T *buf)
|
||||
{
|
||||
array = unwrap (array);
|
||||
@ -1491,8 +1499,8 @@ _Jv_JNI_GetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array,
|
||||
|
||||
template<typename T>
|
||||
static void
|
||||
_Jv_JNI_SetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array,
|
||||
jsize start, jsize len, T *buf)
|
||||
(JNICALL _Jv_JNI_SetPrimitiveArrayRegion) (JNIEnv *env, JArray<T> *array,
|
||||
jsize start, jsize len, T *buf)
|
||||
{
|
||||
array = unwrap (array);
|
||||
|
||||
@ -1518,8 +1526,8 @@ _Jv_JNI_SetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array,
|
||||
}
|
||||
|
||||
static void *
|
||||
_Jv_JNI_GetPrimitiveArrayCritical (JNIEnv *, jarray array,
|
||||
jboolean *isCopy)
|
||||
(JNICALL _Jv_JNI_GetPrimitiveArrayCritical) (JNIEnv *, jarray array,
|
||||
jboolean *isCopy)
|
||||
{
|
||||
array = unwrap (array);
|
||||
// FIXME: does this work?
|
||||
@ -1532,13 +1540,13 @@ _Jv_JNI_GetPrimitiveArrayCritical (JNIEnv *, jarray array,
|
||||
}
|
||||
|
||||
static void
|
||||
_Jv_JNI_ReleasePrimitiveArrayCritical (JNIEnv *, jarray, void *, jint)
|
||||
(JNICALL _Jv_JNI_ReleasePrimitiveArrayCritical) (JNIEnv *, jarray, void *, jint)
|
||||
{
|
||||
// Nothing.
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_MonitorEnter (JNIEnv *env, jobject obj)
|
||||
(JNICALL _Jv_JNI_MonitorEnter) (JNIEnv *env, jobject obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1553,7 +1561,7 @@ _Jv_JNI_MonitorEnter (JNIEnv *env, jobject obj)
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_MonitorExit (JNIEnv *env, jobject obj)
|
||||
(JNICALL _Jv_JNI_MonitorExit) (JNIEnv *env, jobject obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1569,8 +1577,8 @@ _Jv_JNI_MonitorExit (JNIEnv *env, jobject obj)
|
||||
|
||||
// JDK 1.2
|
||||
jobject
|
||||
_Jv_JNI_ToReflectedField (JNIEnv *env, jclass cls, jfieldID fieldID,
|
||||
jboolean)
|
||||
(JNICALL _Jv_JNI_ToReflectedField) (JNIEnv *env, jclass cls, jfieldID fieldID,
|
||||
jboolean)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1590,7 +1598,7 @@ _Jv_JNI_ToReflectedField (JNIEnv *env, jclass cls, jfieldID fieldID,
|
||||
|
||||
// JDK 1.2
|
||||
static jfieldID
|
||||
_Jv_JNI_FromReflectedField (JNIEnv *, jobject f)
|
||||
(JNICALL _Jv_JNI_FromReflectedField) (JNIEnv *, jobject f)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
@ -1600,8 +1608,8 @@ _Jv_JNI_FromReflectedField (JNIEnv *, jobject f)
|
||||
}
|
||||
|
||||
jobject
|
||||
_Jv_JNI_ToReflectedMethod (JNIEnv *env, jclass klass, jmethodID id,
|
||||
jboolean)
|
||||
(JNICALL _Jv_JNI_ToReflectedMethod) (JNIEnv *env, jclass klass, jmethodID id,
|
||||
jboolean)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
|
||||
@ -1635,7 +1643,7 @@ _Jv_JNI_ToReflectedMethod (JNIEnv *env, jclass klass, jmethodID id,
|
||||
}
|
||||
|
||||
static jmethodID
|
||||
_Jv_JNI_FromReflectedMethod (JNIEnv *, jobject method)
|
||||
(JNICALL _Jv_JNI_FromReflectedMethod) (JNIEnv *, jobject method)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
method = unwrap (method);
|
||||
@ -1647,7 +1655,7 @@ _Jv_JNI_FromReflectedMethod (JNIEnv *, jobject method)
|
||||
|
||||
// JDK 1.2.
|
||||
jweak
|
||||
_Jv_JNI_NewWeakGlobalRef (JNIEnv *env, jobject obj)
|
||||
(JNICALL _Jv_JNI_NewWeakGlobalRef) (JNIEnv *env, jobject obj)
|
||||
{
|
||||
using namespace gnu::gcj::runtime;
|
||||
JNIWeakRef *ref = NULL;
|
||||
@ -1668,7 +1676,7 @@ _Jv_JNI_NewWeakGlobalRef (JNIEnv *env, jobject obj)
|
||||
}
|
||||
|
||||
void
|
||||
_Jv_JNI_DeleteWeakGlobalRef (JNIEnv *, jweak obj)
|
||||
(JNICALL _Jv_JNI_DeleteWeakGlobalRef) (JNIEnv *, jweak obj)
|
||||
{
|
||||
using namespace gnu::gcj::runtime;
|
||||
JNIWeakRef *ref = reinterpret_cast<JNIWeakRef *> (obj);
|
||||
@ -1681,21 +1689,21 @@ _Jv_JNI_DeleteWeakGlobalRef (JNIEnv *, jweak obj)
|
||||
// Direct byte buffers.
|
||||
|
||||
static jobject
|
||||
_Jv_JNI_NewDirectByteBuffer (JNIEnv *, void *, jlong)
|
||||
(JNICALL _Jv_JNI_NewDirectByteBuffer) (JNIEnv *, void *, jlong)
|
||||
{
|
||||
// For now we don't support this.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *
|
||||
_Jv_JNI_GetDirectBufferAddress (JNIEnv *, jobject)
|
||||
(JNICALL _Jv_JNI_GetDirectBufferAddress) (JNIEnv *, jobject)
|
||||
{
|
||||
// For now we don't support this.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static jlong
|
||||
_Jv_JNI_GetDirectBufferCapacity (JNIEnv *, jobject)
|
||||
(JNICALL _Jv_JNI_GetDirectBufferCapacity) (JNIEnv *, jobject)
|
||||
{
|
||||
// For now we don't support this.
|
||||
return -1;
|
||||
@ -1818,9 +1826,9 @@ nathash_add (const JNINativeMethod *method)
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_RegisterNatives (JNIEnv *env, jclass klass,
|
||||
const JNINativeMethod *methods,
|
||||
jint nMethods)
|
||||
(JNICALL _Jv_JNI_RegisterNatives) (JNIEnv *env, jclass klass,
|
||||
const JNINativeMethod *methods,
|
||||
jint nMethods)
|
||||
{
|
||||
// Synchronize while we do the work. This must match
|
||||
// synchronization in some other functions that manipulate or use
|
||||
@ -1872,7 +1880,7 @@ _Jv_JNI_RegisterNatives (JNIEnv *env, jclass klass,
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_UnregisterNatives (JNIEnv *, jclass)
|
||||
(JNICALL _Jv_JNI_UnregisterNatives) (JNIEnv *, jclass)
|
||||
{
|
||||
// FIXME -- we could implement this.
|
||||
return JNI_ERR;
|
||||
@ -2199,19 +2207,20 @@ _Jv_JNI_AttachCurrentThread (JavaVM *, jstring name, void **penv,
|
||||
|
||||
// This is the one actually used by JNI.
|
||||
static jint
|
||||
_Jv_JNI_AttachCurrentThread (JavaVM *vm, void **penv, void *args)
|
||||
(JNICALL _Jv_JNI_AttachCurrentThread) (JavaVM *vm, void **penv, void *args)
|
||||
{
|
||||
return _Jv_JNI_AttachCurrentThread (vm, NULL, penv, args, false);
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_AttachCurrentThreadAsDaemon (JavaVM *vm, void **penv, void *args)
|
||||
(JNICALL _Jv_JNI_AttachCurrentThreadAsDaemon) (JavaVM *vm, void **penv,
|
||||
void *args)
|
||||
{
|
||||
return _Jv_JNI_AttachCurrentThread (vm, NULL, penv, args, true);
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_DestroyJavaVM (JavaVM *vm)
|
||||
(JNICALL _Jv_JNI_DestroyJavaVM) (JavaVM *vm)
|
||||
{
|
||||
JvAssert (the_vm && vm == the_vm);
|
||||
|
||||
@ -2245,14 +2254,14 @@ _Jv_JNI_DestroyJavaVM (JavaVM *vm)
|
||||
}
|
||||
|
||||
jint
|
||||
_Jv_JNI_DetachCurrentThread (JavaVM *)
|
||||
(JNICALL _Jv_JNI_DetachCurrentThread) (JavaVM *)
|
||||
{
|
||||
jint code = _Jv_DetachCurrentThread ();
|
||||
return code ? JNI_EDETACHED : 0;
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_GetEnv (JavaVM *, void **penv, jint version)
|
||||
(JNICALL _Jv_JNI_GetEnv) (JavaVM *, void **penv, jint version)
|
||||
{
|
||||
if (_Jv_ThreadCurrent () == NULL)
|
||||
{
|
||||
@ -2281,7 +2290,7 @@ _Jv_JNI_GetEnv (JavaVM *, void **penv, jint version)
|
||||
return 0;
|
||||
}
|
||||
|
||||
jint
|
||||
JNIEXPORT jint JNICALL
|
||||
JNI_GetDefaultJavaVMInitArgs (void *args)
|
||||
{
|
||||
jint version = * (jint *) args;
|
||||
@ -2298,7 +2307,7 @@ JNI_GetDefaultJavaVMInitArgs (void *args)
|
||||
return 0;
|
||||
}
|
||||
|
||||
jint
|
||||
JNIEXPORT jint JNICALL
|
||||
JNI_CreateJavaVM (JavaVM **vm, void **penv, void *args)
|
||||
{
|
||||
JvAssert (! the_vm);
|
||||
@ -2363,7 +2372,7 @@ JNI_CreateJavaVM (JavaVM **vm, void **penv, void *args)
|
||||
return 0;
|
||||
}
|
||||
|
||||
jint
|
||||
JNIEXPORT jint JNICALL
|
||||
JNI_GetCreatedJavaVMs (JavaVM **vm_buffer, jsize buf_len, jsize *n_vms)
|
||||
{
|
||||
if (buf_len <= 0)
|
||||
@ -2404,7 +2413,7 @@ _Jv_GetJavaVM ()
|
||||
}
|
||||
|
||||
static jint
|
||||
_Jv_JNI_GetJavaVM (JNIEnv *, JavaVM **vm)
|
||||
(JNICALL _Jv_JNI_GetJavaVM) (JNIEnv *, JavaVM **vm)
|
||||
{
|
||||
*vm = _Jv_GetJavaVM ();
|
||||
return *vm == NULL ? JNI_ERR : JNI_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user