github.com/huandu/go@v0.0.0-20151114150818-04e615e41150/misc/cgo/errors/err3.go (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package main 6 7 /* 8 typedef struct foo foo_t; 9 typedef struct bar bar_t; 10 11 foo_t *foop; 12 */ 13 import "C" 14 15 func main() { 16 x := (*C.bar_t)(nil) 17 C.foop = x // ERROR HERE 18 }