% more t.go
package main
import (
"syscall"
"unsafe"
"fmt"
)
func main() {
fmt.Println(unsafe.Sizeof(syscall.Timeval))
}
% go run t.go
# command-line-arguments
./t.go:10: type syscall.Timeval is not an expression
./t.go:10: invalid expression unsafe.Sizeof(syscall.Timeval)
Is this a bug, or a limitation of cgo derived types ?
Cheers
Dave
-rob
Cheers
Dave
thus
sizeof i
but also
sizeof(int)
but not
sizeof int
People think C sizeof is a function but it's an operator; the
expression sizeof(int) parses differently from the way most people
interpret it.
We're getting off topic.
-rob