summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/jau/jni/jni_mem.hpp6
-rw-r--r--java_jni/jni/jni_mem.cxx6
2 files changed, 10 insertions, 2 deletions
diff --git a/include/jau/jni/jni_mem.hpp b/include/jau/jni/jni_mem.hpp
index b99f68a..579eb6d 100644
--- a/include/jau/jni/jni_mem.hpp
+++ b/include/jau/jni/jni_mem.hpp
@@ -35,6 +35,8 @@
#include <jau/basic_types.hpp>
+namespace jau {
+
/** \addtogroup JavaVM
*
* @{
@@ -72,6 +74,8 @@ public:
/* Each thread has a local jni_env variable of JNIEnvContainer type */
extern thread_local JNIEnvContainer jni_env;
+class JavaGlobalObj; // fwd
+
/*
* This class provides a lifetime-managed GlobalRef variable,
* which is automatically deleted when it goes out of scope.
@@ -209,5 +213,7 @@ public:
/**@}*/
+} /* namespace jau */
+
#endif /* JAU_JNIMEM__HPP_ */
diff --git a/java_jni/jni/jni_mem.cxx b/java_jni/jni/jni_mem.cxx
index d158965..315725b 100644
--- a/java_jni/jni/jni_mem.cxx
+++ b/java_jni/jni/jni_mem.cxx
@@ -31,8 +31,10 @@
#include <jau/debug.hpp>
#include <jau/jni/jni_mem.hpp>
-JavaVM* vm;
-thread_local JNIEnvContainer jni_env;
+using namespace jau;
+
+JavaVM* jau::vm;
+thread_local JNIEnvContainer jau::jni_env;
jint JNI_OnLoad(JavaVM *initVM, void *reserved) {
(void)reserved; // warning