Files
go-gst/gst/base/util.go
2021-01-08 22:00:38 +02:00

18 lines
321 B
Go

package base
//#include "gst.go.h"
import "C"
// gboolean converts a go bool to a C.gboolean.
func gboolean(b bool) C.gboolean {
if b {
return C.gboolean(1)
}
return C.gboolean(0)
}
// gobool provides an easy type conversion between C.gboolean and a go bool.
func gobool(b C.gboolean) bool {
return int(b) > 0
}