return (msg_storage_t) (uintptr_t) env->GetLongField(jstorage, jstorage_field_Storage_bind);
}
-JNIEXPORT void JNICALL
-Java_org_simgrid_msg_Storage_nativeInit(JNIEnv *env, jclass cls) {
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Storage_nativeInit(JNIEnv *env, jclass cls) {
jclass class_Storage = env->FindClass("org/simgrid/msg/Storage");
jstorage_method_Storage_constructor = env->GetMethodID(class_Storage, "<init>", "()V");
jstorage_field_Storage_bind = jxbt_get_jfield(env,class_Storage, "bind", "J");
return MSG_storage_get_name(storage);
}
-JNIEXPORT jobject JNICALL
-Java_org_simgrid_msg_Storage_getByName(JNIEnv * env, jclass cls,
- jstring jname) {
+JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getByName(JNIEnv * env, jclass cls, jstring jname) {
msg_storage_t storage;
jobject jstorage;
/* get the C string from the java string */
if (jname == NULL) {
- jxbt_throw_null(env,bprintf("No host can have a null name"));
- return NULL;
+ jxbt_throw_null(env,bprintf("No host can have a null name"));
+ return NULL;
}
const char *name = env->GetStringUTFChars(jname, 0);
storage = MSG_storage_get_by_name(name);
return (jobject) xbt_lib_get_level(storage, JAVA_STORAGE_LEVEL);
}
-
-JNIEXPORT jlong JNICALL
-Java_org_simgrid_msg_Storage_getSize(JNIEnv * env,jobject jstorage) {
+JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getSize(JNIEnv * env,jobject jstorage) {
msg_storage_t storage = jstorage_get_native(env, jstorage);
if (!storage) {
return (jlong) MSG_storage_get_size(storage);
}
-JNIEXPORT jlong JNICALL
-Java_org_simgrid_msg_Storage_getFreeSize(JNIEnv * env,jobject jstorage) {
+JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getFreeSize(JNIEnv * env,jobject jstorage) {
msg_storage_t storage = jstorage_get_native(env, jstorage);
if (!storage) {
return (jlong) MSG_storage_get_free_size(storage);
}
-JNIEXPORT jlong JNICALL
-Java_org_simgrid_msg_Storage_getUsedSize(JNIEnv * env,jobject jstorage) {
+JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getUsedSize(JNIEnv * env,jobject jstorage) {
msg_storage_t storage = jstorage_get_native(env, jstorage);
if (!storage) {
return (jlong) MSG_storage_get_used_size(storage);
}
-JNIEXPORT jobject JNICALL
-Java_org_simgrid_msg_Storage_getProperty(JNIEnv *env, jobject jstorage, jobject jname) {
+JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getProperty(JNIEnv *env, jobject jstorage, jobject jname) {
msg_storage_t storage = jstorage_get_native(env, jstorage);
if (!storage) {
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject jname, jobject jvalue) {
- msg_storage_t storage = jstorage_get_native(env, jstorage);
+ msg_storage_t storage = jstorage_get_native(env, jstorage);
if (!storage) {
jxbt_throw_notbound(env, "storage", jstorage);
MSG_storage_set_property_value(storage, name, value, xbt_free_f);
- env->ReleaseStringUTFChars((jstring) jvalue, value);
+ env->ReleaseStringUTFChars((jstring) jvalue, value_java);
env->ReleaseStringUTFChars((jstring) jname, name);
}
-JNIEXPORT jobject JNICALL
-Java_org_simgrid_msg_Storage_getHost(JNIEnv * env,jobject jstorage) {
+JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getHost(JNIEnv * env,jobject jstorage) {
msg_storage_t storage = jstorage_get_native(env, jstorage);
if (!storage) {
return jhost_name;
}
-JNIEXPORT jobjectArray JNICALL
-Java_org_simgrid_msg_Storage_all(JNIEnv * env, jclass cls_arg)
+JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Storage_all(JNIEnv * env, jclass cls_arg)
{
int index;
jobjectArray jtable;