andlabs-ui/util.go

26 lines
260 B
Go
Raw Normal View History

2015-12-12 12:07:57 -06:00
// 12 december 2015
package ui
import (
"unsafe"
)
// #include <stdlib.h>
import "C"
func freestr(str *C.char) {
C.free(unsafe.Pointer(str))
}
func tobool(b C.int) bool {
return b != 0
}
func frombool(b bool) C.int {
if b {
return 1
}
return 0
}