mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind/java: fix build
Tested on darwin/amd64 with go build golang.org/x/mobile/... Change-Id: Iec31ccb318913cea5acc7dcec1c6a858bf8654de Reviewed-on: https://go-review.googlesource.com/5770 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
// Copyright 2015 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 implements the Java language bindings.
|
||||
//
|
||||
// See the design document (http://golang.org/s/gobind).
|
||||
//
|
||||
// Currently, this works only for android.
|
||||
package java
|
||||
|
||||
// Init initializes communication with Java.
|
||||
// Typically called from the Start callback in app.Run.
|
||||
func Init() {
|
||||
initSeq()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
// +build !android
|
||||
|
||||
package java
|
||||
|
||||
func initSeq() {}
|
||||
@@ -78,9 +78,7 @@ func init() {
|
||||
res.out = make(map[int32]*seq.Buffer)
|
||||
}
|
||||
|
||||
// Init initializes communication with Java.
|
||||
// Typically called from the Start callback in app.Run.
|
||||
func Init() {
|
||||
func initSeq() {
|
||||
vm := app.State.(interface {
|
||||
JavaVM() unsafe.Pointer
|
||||
}).JavaVM()
|
||||
|
||||
Reference in New Issue
Block a user