Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ansi C declaration of the variables (at the beginning of the blocks)
[simgrid.git] / src / java / jxbt_utilities.c
index 2ef04a3..aa2b5c6 100644 (file)
@@ -16,8 +16,6 @@
 #include "xbt/str.h"
 #include "jxbt_utilities.h"
 
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
-
 /* *********** */
 /* JNI GETTERS */
 /* *********** */
@@ -64,11 +62,15 @@ jmethodID jxbt_get_jmethod(JNIEnv* env, jclass cls,
 
 jmethodID jxbt_get_smethod(JNIEnv* env, const char *classname, 
                          const char *name,const char *signature) { 
-  jclass cls = jxbt_get_class(env,classname);
-  jmethodID id;
+  
+       jclass cls;
+
+       jmethodID id;
+       cls = jxbt_get_class(env,classname);
 
   if (!cls)
     return 0;
+
   id = (*env)->GetMethodID(env, cls, name,signature);
        
   if(!id) {
@@ -79,7 +81,6 @@ jmethodID jxbt_get_smethod(JNIEnv* env, const char *classname,
     free(m);
     return 0;
   }
-
   return id;
 }