diff --git a/app/android.go b/app/android.go index dff66c9..883a93c 100644 --- a/app/android.go +++ b/app/android.go @@ -68,7 +68,7 @@ import ( //export setCurrentContext func setCurrentContext(vm *C.JavaVM, ctx C.jobject) { - mobileinit.SetCurrentContext(unsafe.Pointer(vm), unsafe.Pointer(ctx)) + mobileinit.SetCurrentContext(unsafe.Pointer(vm), uintptr(ctx)) } //export callMain diff --git a/bind/java/context_android.go b/bind/java/context_android.go index cf41109..dc44431 100644 --- a/bind/java/context_android.go +++ b/bind/java/context_android.go @@ -17,5 +17,5 @@ import ( //export setContext func setContext(vm *C.JavaVM, ctx C.jobject) { - mobileinit.SetCurrentContext(unsafe.Pointer(vm), unsafe.Pointer(ctx)) + mobileinit.SetCurrentContext(unsafe.Pointer(vm), uintptr(ctx)) } diff --git a/internal/mobileinit/ctx_android.go b/internal/mobileinit/ctx_android.go index 559f918..e0dc166 100644 --- a/internal/mobileinit/ctx_android.go +++ b/internal/mobileinit/ctx_android.go @@ -78,7 +78,7 @@ import ( // SetCurrentContext populates the global Context object with the specified // current JavaVM instance (vm) and android.context.Context object (ctx). // The android.context.Context object must be a global reference. -func SetCurrentContext(vm, ctx unsafe.Pointer) { +func SetCurrentContext(vm unsafe.Pointer, ctx uintptr) { C.current_vm = (*C.JavaVM)(vm) C.current_ctx = (C.jobject)(ctx) }