X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e0188e2a2598ce57a4d21a3d7eb5f303aecaf0dd..01896eb20275e43d44368ae74747d778712dc3b5:/src/bindings/java/jmsg_file.c diff --git a/src/bindings/java/jmsg_file.c b/src/bindings/java/jmsg_file.c index 1d45583d73..9266483085 100644 --- a/src/bindings/java/jmsg_file.c +++ b/src/bindings/java/jmsg_file.c @@ -6,12 +6,14 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "jmsg_file.h" #include "jxbt_utilities.h" + void jfile_bind(JNIEnv *env, jobject jfile, msg_file_t stream) { - (*env)->SetLongField(env, jfile, jfile_field_bind, (jlong) (long) (stream)); + (*env)->SetLongField(env, jfile, jfile_field_bind, (intptr_t)stream); } msg_file_t jfile_get_native(JNIEnv *env, jobject jfile) { - msg_file_t file = (msg_file_t)(*env)->GetLongField(env, jfile, jfile_field_bind); + msg_file_t file = + (msg_file_t)(intptr_t)(*env)->GetLongField(env, jfile, jfile_field_bind); return file; }