Beispiel #1
0
func (i *INFO) Bytes() []byte {
	kstr := C.kstring_t{}
	C.format_info(i.b, i.hdr, &kstr)
	v := C.GoBytes(unsafe.Pointer(kstr.s), C.int(kstr.l))
	C.free(unsafe.Pointer(kstr.s))
	return v
}
Beispiel #2
0
func (i *INFO) String() string {
	kstr := C.kstring_t{}
	C.format_info(i.b, i.hdr, &kstr)
	v := C.GoStringN(kstr.s, C.int(kstr.l))
	C.free(unsafe.Pointer(kstr.s))
	return v
}