JNIEnv *get_current_thread_env()
{
using simgrid::kernel::context::JavaContext;
- JavaContext* ctx = static_cast<JavaContext*>(simgrid::kernel::context::Context::self());
+ const JavaContext* ctx = static_cast<JavaContext*>(simgrid::kernel::context::Context::self());
if (ctx)
return ctx->jenv_;
else
env->GetJavaVM(&__java_vm);
simgrid::kernel::context::factory_initializer = &simgrid::kernel::context::java_factory;
- jthrowable exc = env->ExceptionOccurred();
+ const _jthrowable* exc = env->ExceptionOccurred();
if (exc) {
env->ExceptionClear();
}
argc += static_cast<int>(env->GetArrayLength(jargs));
xbt_assert(argc > 0);
- // Need a static storage because the XBT layer saves the arguments in xbt_binary_name and xbt_cmdline.
+ // Need a static storage because the XBT layer saves the arguments in xbt::binary_name and xbt::cmdline.
static std::vector<std::string> args;
args.reserve(argc);
/* Cleanup java hosts */
xbt_dynar_t hosts = MSG_hosts_as_dynar();
for (unsigned long index = 0; index < xbt_dynar_length(hosts) - 1; index++) {
- msg_host_t msg_host = xbt_dynar_get_as(hosts,index,msg_host_t);
+ auto const* msg_host = xbt_dynar_get_as(hosts, index, msg_host_t);
jobject jhost = (jobject) msg_host->extension(JAVA_HOST_LEVEL);
if (jhost)
jhost_unref(env, jhost);