Example #1
0
File: pbs.go Project: jbarber/pbs
func Pbs_strerror(errno int) string {
	// char* from pbs_strerror is statically allocated, so can't be freed
	return C.GoString(C.pbs_strerror(C.int(errno)))
}
Example #2
0
// GetLastError return last error.
func GetLastError() error {
	en := C.pbs_errno
	estr := C.pbs_strerror(en) // static string
	return errors.New(C.GoString(estr))
}