cgo
/*
typedef struct SA{
int a;
const char *s;
}SA;
int Init(struct SA* s){
s->a = 9;
s->s = "okkasjdf";
return 1;
}
int Final(struct SA* s){
return 2;
}
*/
import "C"
import "fmt"
type A struct {
a C.SA
d int
}
func main() {
a := new(A)
r := C.Init(&a.a)
rd := C.int(21)
if (r != rd){
fmt.Println("err1")
}
rd = C.Final(&a.a)
}