]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: make JNI's jobject type map to uintptr in Go
authorKeith Randall <khr@golang.org>
Tue, 5 Dec 2017 05:29:38 +0000 (21:29 -0800)
committerKeith Randall <khr@golang.org>
Fri, 8 Dec 2017 16:13:14 +0000 (16:13 +0000)
commit36aa2b036d762649a3b5a2b702b25e15cfd5c012
tree0c4e4b0cd74912cd159f1598bc2b9a12e822b57d
parentd1fa58719e171afedfbcdf3646ee574afc08086c
cmd/cgo: make JNI's jobject type map to uintptr in Go

The jobject type is declared as a pointer, but some JVMs
(Dalvik, ART) store non-pointer values in them. In Go, we must
use uintptr instead of a real pointer for these types.

This is similar to the CoreFoundation types on Darwin which
were "fixed" in CL 66332.

Update #22906
Update #21897

RELNOTE=yes

Change-Id: I0d4c664501d89a696c2fb037c995503caabf8911
Reviewed-on: https://go-review.googlesource.com/81876
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/test/cgo_test.go
misc/cgo/test/test22906.go [new file with mode: 0644]
src/cmd/cgo/gcc.go
src/cmd/fix/cftype.go
src/cmd/fix/jnitype.go [new file with mode: 0644]
src/cmd/fix/jnitype_test.go [new file with mode: 0644]