File tree Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Original file line number Diff line number Diff line change 1414
1515import JavaRuntime
1616
17- #if canImport(Android)
18- typealias JNINativeInterface_ = JNINativeInterface
19- #endif
20-
2117extension UnsafeMutablePointer < JNIEnv ? > {
2218 var interface : JNINativeInterface_ { self . pointee!. pointee }
2319}
Original file line number Diff line number Diff line change @@ -19,11 +19,7 @@ import Foundation
1919#endif
2020
2121public typealias JavaVMPointer = UnsafeMutablePointer < JavaVM ? >
22- #if canImport(Android)
23- typealias JNIEnvPointer = UnsafeMutablePointer < JNIEnv ? >
24- #else
2522typealias JNIEnvPointer = UnsafeMutableRawPointer
26- #endif
2723
2824public final class JavaVirtualMachine : @unchecked Sendable {
2925 /// The JNI version that we depend on.
@@ -166,11 +162,7 @@ extension JavaVirtualMachine {
166162 return environment. assumingMemoryBound ( to: JNIEnv ? . self)
167163 }
168164
169- #if canImport(Android)
170- var jniEnv = environment? . assumingMemoryBound ( to: JNIEnv ? . self)
171- #else
172165 var jniEnv = environment
173- #endif
174166
175167 // Attach the current thread to the JVM.
176168 let attachResult : jint
@@ -188,11 +180,7 @@ extension JavaVirtualMachine {
188180
189181 JavaVirtualMachine . destroyTLS. set ( jniEnv!)
190182
191- #if canImport(Android)
192- return jniEnv!
193- #else
194183 return jniEnv!. assumingMemoryBound ( to: JNIEnv ? . self)
195- #endif
196184 }
197185
198186 /// Detach the current thread from the Java Virtual Machine. All Java
You can’t perform that action at this time.
0 commit comments