/[gcjwebplugin]/gcjwebplugin/src/jniHelp.h
ViewVC logotype

Diff of /gcjwebplugin/src/jniHelp.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mkoch, Tue Jul 15 20:28:14 2003 UTC revision 1.2 by mkoch, Mon Jul 28 07:00:43 2003 UTC
# Line 34  obligated to do so.  If you do not wish Line 34  obligated to do so.  If you do not wish
34  exception statement from your version. */  exception statement from your version. */
35    
36    
37  #define CHECK_EXCEPTIONS \  #define CHECK_EXCEPTIONS(env) \
38    if (m_jniEnv->ExceptionOccurred ()) \    if (env->ExceptionOccurred ()) \
39      { \      { \
40         m_jniEnv->ExceptionDescribe (); \         env->ExceptionDescribe (); \
41         m_jniEnv->ExceptionClear (); \         env->ExceptionClear (); \
42      }      }
43    
44    #define JNI_FindClass(env, name, result) \
45    result = env->FindClass (name); \
46    assert (result != NULL);
47    
48    #define JNI_GetObjectClass(env, obj, result) \
49    result = env->GetObjectClass (obj); \
50    assert (result != NULL);
51    
52    #define JNI_GetMethodID(env, clazz, name, sig, result) \
53    result = env->GetMethodID (clazz, name, sig); \
54    assert (result != NULL);
55    
56    #define JNI_NewObject0(env, clazz, method, result) \
57    result = env->NewObject (clazz, method); \
58    assert (result != NULL); \
59    CHECK_EXCEPTIONS (env);
60    
61    #define JNI_NewObject1(env, clazz, method, arg1, result) \
62    result = env->NewObject (clazz, method, arg1); \
63    assert (result != NULL); \
64    CHECK_EXCEPTIONS (env);
65    
66    #define JNI_CallObjectMethod0(env, clazz, method, result) \
67    result = env->CallObjectMethod (clazz, method); \
68    CHECK_EXCEPTIONS (env);
69    
70    #define JNI_CallObjectMethod1(env, clazz, method, arg1, result) \
71    result = env->CallObjectMethod (clazz, method, arg1); \
72    CHECK_EXCEPTIONS (env);
73    
74    #define JNI_CallVoidMethod0(env, clazz, method) \
75    env->CallVoidMethod (clazz, method); \
76    CHECK_EXCEPTIONS (env);
77    
78    #define JNI_CallVoidMethod1(env, clazz, method, arg1) \
79    env->CallVoidMethod (clazz, method, arg1); \
80    CHECK_EXCEPTIONS (env);
81    
82    #define JNI_CallVoidMethod2(env, clazz, method, arg1, arg2) \
83    env->CallVoidMethod (clazz, method, arg1, arg2); \
84    CHECK_EXCEPTIONS (env);
85    
86    #define JNI_CallVoidMethod3(env, clazz, method, arg1, arg2, arg3) \
87    env->CallVoidMethod (clazz, method, arg1, arg2, arg3); \
88    CHECK_EXCEPTIONS (env);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26