-
-JNIEXPORT void JNICALL
-Java_simgrid_msg_MsgNative_selectContextFactory(JNIEnv * env, jclass class,
- jstring jname)
-{
- char *errmsg = NULL;
- xbt_ex_t e;
-
- /* get the C string from the java string */
- const char *name = (*env)->GetStringUTFChars(env, jname, 0);
-
- TRY {
- SIMIX_context_select_factory(name);
- } CATCH(e) {
- errmsg = xbt_strdup(e.msg);
- xbt_ex_free(e);
- }
-
- (*env)->ReleaseStringUTFChars(env, jname, name);
-
- if (errmsg) {
- char *thrown =
- bprintf("xbt_select_context_factory() failed: %s", errmsg);
- free(errmsg);
- jxbt_throw_jni(env, thrown);
- }
-}
-