Files
llgo/cl/_testrt/structsize/in.go

20 lines
192 B
Go
Raw Normal View History

2024-07-11 21:41:54 +08:00
package main
import (
"unsafe"
2025-04-03 15:52:18 +08:00
"github.com/goplus/lib/c"
2024-07-11 21:41:54 +08:00
)
type Foo struct {
A byte
B uint8
C uint16
D byte
E [8]int8
}
func main() {
c.Printf(c.Str("%d"), unsafe.Sizeof(Foo{}))
}