aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime/cgocall.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/runtime/cgocall.go')
-rw-r--r--libgo/go/runtime/cgocall.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/runtime/cgocall.go b/libgo/go/runtime/cgocall.go
index 69c3e44..587001c 100644
--- a/libgo/go/runtime/cgocall.go
+++ b/libgo/go/runtime/cgocall.go
@@ -101,7 +101,7 @@ const cgoResultFail = "cgo result has Go pointer"
// depending on indir. The top parameter is whether we are at the top
// level, where Go pointers are allowed.
func cgoCheckArg(t *_type, p unsafe.Pointer, indir, top bool, msg string) {
- if t.kind&kindNoPointers != 0 {
+ if t.ptrdata == 0 {
// If the type has no pointers there is nothing to do.
return
}
@@ -164,7 +164,7 @@ func cgoCheckArg(t *_type, p unsafe.Pointer, indir, top bool, msg string) {
if !top {
panic(errorString(msg))
}
- if st.elem.kind&kindNoPointers != 0 {
+ if st.elem.ptrdata == 0 {
return
}
for i := 0; i < s.cap; i++ {