Exemplo n.º 1
0
func cdrv_cb(cb unsafe.Pointer, id []byte, reply []byte, flag int, ctx unsafe.Pointer) {
	if len(reply) == 0 {
		C.cdrv_cb(cb, unsafe.Pointer(&id[0]), C.int(len(id)), nil, 0, C.int(flag), ctx)
	} else {
		C.cdrv_cb(cb, unsafe.Pointer(&id[0]), C.int(len(id)), unsafe.Pointer(&reply[0]), C.int(len(reply)), C.int(flag), ctx)
	}
}
Exemplo n.º 2
0
func cdrv_cb(cb unsafe.Pointer, id []byte, reply []byte, err int, ctx unsafe.Pointer) {
	C.cdrv_cb(cb, unsafe.Pointer(&id[0]), unsafe.Pointer(&reply[0]), C.int(len(reply)), C.int(err), ctx)
}