Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fixup the context mess
[simgrid.git] / src / java / jmsg.c
index f0aae36..e74aec4 100644 (file)
@@ -12,8 +12,7 @@
 #include "msg/msg.h"
 #include "msg/private.h"
 #include "simix/private.h"
-#include "xbt/xbt_jcontext.h"
-#include "xbt/xbt_context_factory.h"
+#include "xbt/xbt_context_java.h"
 
 #include "jmsg_process.h"
 #include "jmsg_host.h"
@@ -23,7 +22,7 @@
 
 #include "jmsg.h"
 
-#include "msg/msg_mailbox.h"
+#include "msg/mailbox.h"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
 
@@ -49,7 +48,7 @@ get_current_thread_env(void) {
 static jobject
 native_to_java_process(m_process_t process)
 {
-       return ((xbt_jcontext_t)(process->simdata->s_process->simdata->context))->jprocess;     
+       return ((xbt_ctx_java_t)(process->simdata->s_process->simdata->context))->jprocess;     
 }
 
 
@@ -845,7 +844,7 @@ Java_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs) {
 
   argc++;
        
-  argv = (char**)calloc(argc,sizeof(char*));
+  argv = xbt_new0(char*,1);
         
   argv[0] = strdup("java");