Fixes #18412
Change-Id: Ib457eeced7820517aa35df9e7dfda1c0de4ac004
Reviewed-on: https://go-review.googlesource.com/52852
Reviewed-by: Avelino <t@avelino.xxx>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
found in the _cgo_export.h generated header, after any preambles
copied from the cgo input files. Functions with multiple
return values are mapped to functions returning a struct.
+
Not all Go types can be mapped to C types in a useful way.
+Go struct types are not supported; use a C struct type.
+Go array types are not supported; use a C pointer.
Using //export in a file places a restriction on the preamble:
since it is copied into two different C output files, it must not
// Slice: pointer, len, cap.
return &Type{Size: p.PtrSize * 3, Align: p.PtrSize, C: c("GoSlice")}
}
+ // Non-slice array types are not supported.
case *ast.StructType:
- // TODO
+ // Not supported.
case *ast.FuncType:
return &Type{Size: p.PtrSize, Align: p.PtrSize, C: c("void*")}
case *ast.InterfaceType: