1
0
Fork 0
golang-golang-x-mobile/bind/java/context_android.go
Daniel Baumann 20149b7f3a
Adding upstream version 0.0~git20250520.a1d9079+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-25 10:58:38 +02:00

21 lines
430 B
Go

// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package java
// #cgo LDFLAGS: -llog
//
//#include <jni.h>
import "C"
import (
"unsafe"
"golang.org/x/mobile/internal/mobileinit"
)
//export setContext
func setContext(vm *C.JavaVM, ctx C.jobject) {
mobileinit.SetCurrentContext(unsafe.Pointer(vm), uintptr(ctx))
}