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
Declare and use ActorImplPtr
[simgrid.git]
/
src
/
bindings
/
java
/
jmsg.cpp
diff --git
a/src/bindings/java/jmsg.cpp
b/src/bindings/java/jmsg.cpp
index
3a5392d
..
abb1bac
100644
(file)
--- a/
src/bindings/java/jmsg.cpp
+++ b/
src/bindings/java/jmsg.cpp
@@
-88,13
+88,8
@@
static void __JAVA_host_priv_free(void *host)
{
}
-static void __JAVA_storage_priv_free(void *storage)
-{
-}
-
JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs)
{
- char **argv = nullptr;
int index;
int argc = 0;
jstring jval;
@@
-117,7
+112,7
@@
JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, j
argc = static_cast<int>(env->GetArrayLength(jargs));
argc++;
-
argv = xbt_new(char *, argc + 1)
;
+
char** argv = new char*[argc + 1]
;
argv[0] = xbt_strdup("java");
for (index = 0; index < argc - 1; index++) {
@@
-137,7
+132,7
@@
JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, j
free(argv[index]);
}
free(argv[argc]);
-
free(argv)
;
+
delete[] argv
;
}
JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls)
@@
-179,12
+174,12
@@
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNI
{
msg_netzone_t as = MSG_zone_get_root();
jobject jas = jnetzone_new_instance(env);
- if (
!
jas) {
+ if (
not
jas) {
jxbt_throw_jni(env, "java As instantiation failed");
return nullptr;
}
jas = jnetzone_ref(env, jas);
- if (
!
jas) {
+ if (
not
jas) {
jxbt_throw_jni(env, "new global ref allocation failed");
return nullptr;
}