/* 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. */
RngStream rngstream = (RngStream)(intptr_t)env->GetLongField(jrngstream, jrngstream_bind);
if (!rngstream) {
jxbt_throw_notbound(env, "rngstream", jrngstream);
RngStream rngstream = (RngStream)(intptr_t)env->GetLongField(jrngstream, jrngstream_bind);
if (!rngstream) {
jxbt_throw_notbound(env, "rngstream", jrngstream);
JNIEXPORT void JNICALL Java_org_simgrid_msg_RngStream_nativeFinalize(JNIEnv *env, jobject jrngstream) {
RngStream rngstream = jrngstream_to_native(env, jrngstream);
RngStream_DeleteStream(&rngstream);
JNIEXPORT void JNICALL Java_org_simgrid_msg_RngStream_nativeFinalize(JNIEnv *env, jobject jrngstream) {
RngStream rngstream = jrngstream_to_native(env, jrngstream);
RngStream_DeleteStream(&rngstream);
}
JNIEXPORT jboolean JNICALL
Java_org_simgrid_msg_RngStream_setPackageSeed(JNIEnv *env, jobject jrngstream, jintArray jseed) {
}
JNIEXPORT jboolean JNICALL
Java_org_simgrid_msg_RngStream_setPackageSeed(JNIEnv *env, jobject jrngstream, jintArray jseed) {
- env->GetIntArrayRegion(jseed, 0, 6, buffer);
-
- RngStream rngstream = jrngstream_to_native(env, jrngstream);
- if (!rngstream)
+ if (jseed == nullptr) {
+ jxbt_throw_null(env, xbt_strdup("seed argument is null"));