/* Various JNI helper functions */
-/* Copyright (c) 2007-2014. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
/* 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. */
-#include <stdlib.h> /* abort */
-#include "xbt/misc.h"
#include "xbt/sysdep.h"
-#include "xbt/str.h"
#include "jxbt_utilities.h"
+#include <stdlib.h> /* abort */
+
+SG_BEGIN_DECL()
+
jclass jxbt_get_class(JNIEnv * env, const char *name)
{
jclass cls = env->FindClass(name);
jxbt_throw_by_name(env, "org/simgrid/msg/JniException", bprintf("Internal error: %s %p not bound", kind, pointer));
}
-void jxbt_throw_native(JNIEnv * env, char *msg)
-{
- jxbt_throw_by_name(env, "org/simgrid/msg/NativeException", msg);
-}
-
void jxbt_throw_null(JNIEnv * env, char *msg)
{
jxbt_throw_by_name(env, "java/lang/NullPointerException", msg);
{
jxbt_throw_by_name(env, "org/simgrid/msg/TaskCancelledException", details);
}
+
+SG_END_DECL()