[Android] jni: myVm can now be static

Thomas Guillem git at videolan.org
Tue Oct 14 15:47:13 CEST 2014


vlc-ports/android | branch: master | Thomas Guillem <tom at gllm.fr> | Tue Oct 14 11:35:39 2014 +0200| [e65b65e095ecc6ef4eb5e066a4ba20476f363888] | committer: Jean-Baptiste Kempf

jni: myVm can now be static

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e65b65e095ecc6ef4eb5e066a4ba20476f363888
---

 vlc-android/jni/libvlcjni-medialist.c |    3 ---
 vlc-android/jni/libvlcjni.c           |    2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/vlc-android/jni/libvlcjni-medialist.c b/vlc-android/jni/libvlcjni-medialist.c
index f782f96..257fadc 100644
--- a/vlc-android/jni/libvlcjni-medialist.c
+++ b/vlc-android/jni/libvlcjni-medialist.c
@@ -28,9 +28,6 @@
 #define LOG_TAG "VLC/JNI/MediaList"
 #include "log.h"
 
-/** Unique Java VM instance, as defined in libvlcjni.c */
-extern JavaVM *myVm;
-
 struct stopped_monitor {
     pthread_mutex_t doneMutex;
     pthread_cond_t doneCondVar;
diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index bfa9a8a..fc191d2 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -115,7 +115,7 @@ static void releaseMediaPlayer(JNIEnv *env, jobject thiz)
  * Note: It's okay to use a static variable for the VM pointer since there
  * can only be one instance of this shared library in a single VM
  */
-JavaVM *myVm;
+static JavaVM *myVm;
 
 static jobject eventHandlerInstance = NULL;
 



More information about the Android mailing list