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// Issue 8148. A typedef of an unnamed struct didn't work when used 6// with an exported Go function. No runtime test; just make sure it 7// compiles. 8 9package cgotest 10 11/* 12typedef struct { int i; } T; 13int get8148(void); 14*/ 15import "C" 16 17//export issue8148Callback 18func issue8148Callback(t *C.T) C.int { 19 return t.i 20} 21 22func Issue8148() int { 23 return int(C.get8148()) 24} 25