cgo: implement char type

This type is a bit more difficult because it can be signed or unsigned
depending on the target platform.
This commit is contained in:
Ayke van Laethem
2019-04-20 15:10:27 +02:00
committed by Ron Evans
parent b2e96fc35a
commit 9c46ac4eed
6 changed files with 20 additions and 1 deletions
+1
View File
@@ -40,6 +40,7 @@ func main() {
println("complex float:", C.globalComplexFloat)
println("complex double:", C.globalComplexDouble)
println("complex long double:", C.globalComplexLongDouble)
println("char match:", C.globalChar == 100)
// complex types
println("struct:", C.int(unsafe.Sizeof(C.globalStruct)) == C.globalStructSize, C.globalStruct.s, C.globalStruct.l, C.globalStruct.f)