[wpimath] Split WPIMathJNI into logical chunks (#5552)

This makes things easier to find, and speeds up compilation.
This commit is contained in:
Tyler Veness
2023-08-29 09:00:19 -07:00
committed by GitHub
parent ea17f90f87
commit b7657a8e28
11 changed files with 651 additions and 530 deletions

View File

@@ -31,7 +31,6 @@ void JNI_UnloadTypes(JNIEnv* env);
//
// Used for callback.
static JavaVM* jvm = nullptr;
static JClass booleanCls;
static JClass connectionInfoCls;
static JClass doubleCls;
@@ -72,8 +71,6 @@ static const JExceptionInit exceptions[] = {
extern "C" {
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) {
jvm = vm;
JNIEnv* env;
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
return JNI_ERR;
@@ -114,7 +111,6 @@ JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved) {
c.cls->free(env);
}
nt::JNI_UnloadTypes(env);
jvm = nullptr;
}
} // extern "C"