summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16dbc21)
raw | patch | inline | side by side (parent: 16dbc21)
author | ishmal <ishmal@users.sourceforge.net> | |
Wed, 12 Mar 2008 20:05:45 +0000 (20:05 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Wed, 12 Mar 2008 20:05:45 +0000 (20:05 +0000) |
src/bind/dobinding.cpp | patch | blob | history | |
src/bind/javabind-private.h | patch | blob | history |
diff --git a/src/bind/dobinding.cpp b/src/bind/dobinding.cpp
index e2157de0b3f69b584e9b6c2640496e1ac95c3a9a..639e27062844729b714734e49e60fff338124f8d 100644 (file)
--- a/src/bind/dobinding.cpp
+++ b/src/bind/dobinding.cpp
JNINativeMethod *methods;
} NativeClass;
+/**
+ * Although I dislike macros, this one seems reasonable
+ */
+#define EXCEPTION (getExceptionString(env).c_str())
//########################################################################
//# BASE OBJECT
jfieldID id = env->GetFieldID(env->GetObjectClass(obj), "_pointer", "J");
if (!id)
{
- err("getPointer: %s", getException(env).c_str());
+ err("getPointer: %s", EXCEPTION);
return 0;
}
jlong val = env->GetLongField(obj, id);
jfieldID id = env->GetFieldID(env->GetObjectClass(obj), "_pointer", "J");
if (!id)
{
- err("setPointer: %s", getException(env).c_str());
+ err("setPointer: %s", EXCEPTION);
return;
}
env->SetLongField(obj, id, val);
index c4dbd5e9a8530aee1a0a6d4f64a3aa807980117b..c919c105dac3c54262493c15e7da7b94bfe701fd 100644 (file)
String getExceptionString(JNIEnv *env);
-String getException(JNIEnv *env)
- { return getExceptionString(env); }
-
jint getInt(JNIEnv *env, jobject obj, const char *name);
void setInt(JNIEnv *env, jobject obj, const char *name, jint val);