A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kill unused member "name_".
[simgrid.git]
/
src
/
bindings
/
java
/
jmsg_vm.cpp
diff --git
a/src/bindings/java/jmsg_vm.cpp
b/src/bindings/java/jmsg_vm.cpp
index b917e08303099d147d1a8babaf0ca1d864612948..0e7b60bb0580d14c14336ada0a5bb0e70070c644 100644
(file)
--- a/
src/bindings/java/jmsg_vm.cpp
+++ b/
src/bindings/java/jmsg_vm.cpp
@@
-1,6
+1,6
@@
/* Functions related to the Virtual Machines. */
/* Functions related to the Virtual Machines. */
-/* Copyright (c) 2012-20
19
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2012-20
20
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-35,28
+35,28
@@
JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_nativeInit(JNIEnv *env, jclass cl
xbt_assert(jvm_field_bind, "Native initialization of msg/VM failed. Please report that bug");
}
xbt_assert(jvm_field_bind, "Native initialization of msg/VM failed. Please report that bug");
}
-JNIEXPORT j
int JNICALL Java_org_simgrid_msg_VM_isCreated(JNIEnv
* env, jobject jvm)
+JNIEXPORT j
boolean JNICALL Java_org_simgrid_msg_VM_isCreated(JNIEnv
* env, jobject jvm)
{
msg_vm_t vm = jvm_get_native(env,jvm);
return MSG_vm_is_created(vm);
}
{
msg_vm_t vm = jvm_get_native(env,jvm);
return MSG_vm_is_created(vm);
}
-JNIEXPORT j
int JNICALL Java_org_simgrid_msg_VM_isRunning(JNIEnv
* env, jobject jvm)
+JNIEXPORT j
boolean JNICALL Java_org_simgrid_msg_VM_isRunning(JNIEnv
* env, jobject jvm)
{
msg_vm_t vm = jvm_get_native(env,jvm);
{
msg_vm_t vm = jvm_get_native(env,jvm);
- return
(jint)
MSG_vm_is_running(vm);
+ return MSG_vm_is_running(vm);
}
}
-JNIEXPORT j
int JNICALL Java_org_simgrid_msg_VM_isMigrating(JNIEnv
* env, jobject jvm)
+JNIEXPORT j
boolean JNICALL Java_org_simgrid_msg_VM_isMigrating(JNIEnv
* env, jobject jvm)
{
{
-
msg_vm_t vm = jvm_get_native(env,
jvm);
- return
(jint)
MSG_vm_is_migrating(vm);
+
const_sg_vm_t vm = jvm_get_native(env,
jvm);
+ return MSG_vm_is_migrating(vm);
}
}
-JNIEXPORT j
int JNICALL Java_org_simgrid_msg_VM_isSuspended(JNIEnv
* env, jobject jvm)
+JNIEXPORT j
boolean JNICALL Java_org_simgrid_msg_VM_isSuspended(JNIEnv
* env, jobject jvm)
{
msg_vm_t vm = jvm_get_native(env,jvm);
{
msg_vm_t vm = jvm_get_native(env,jvm);
- return
(jint)
MSG_vm_is_suspended(vm);
+ return MSG_vm_is_suspended(vm);
}
JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jdouble bound)
}
JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jdouble bound)
@@
-171,7
+171,6
@@
JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_resume(JNIEnv *env, jobject jvm)
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclass cls, jstring jname)
{
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclass cls, jstring jname)
{
-
/* get the C string from the java string */
if (jname == nullptr) {
jxbt_throw_null(env, "No VM can have a null name");
/* get the C string from the java string */
if (jname == nullptr) {
jxbt_throw_null(env, "No VM can have a null name");
@@
-179,7
+178,7
@@
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclas
}
const char* name = env->GetStringUTFChars(jname, 0);
/* get the VM by name (VMs are just special hosts, unfortunately) */
}
const char* name = env->GetStringUTFChars(jname, 0);
/* get the VM by name (VMs are just special hosts, unfortunately) */
-
msg_host_t
host = MSG_host_by_name(name);
+
auto const*
host = MSG_host_by_name(name);
if (not host) { /* invalid name */
jxbt_throw_host_not_found(env, name);
if (not host) { /* invalid name */
jxbt_throw_host_not_found(env, name);