This deals with two casting issues for compiling under go 1.11:
- explicitly cast to *C.xentoollog_logger for Ctx.logger pointer
- add cast to unsafe.Pointer for the C string cpath
Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
}
ret := C.libxl_ctx_alloc(&Ctx.ctx, C.LIBXL_VERSION,
- 0, unsafe.Pointer(Ctx.logger))
+ 0, (*C.xentoollog_logger)(unsafe.Pointer(Ctx.logger)))
if ret != 0 {
err = Error(-ret)
if ret != 0 {
err = Error(-ret)
}
- C.xtl_logger_destroy(unsafe.Pointer(Ctx.logger))
+ C.xtl_logger_destroy((*C.xentoollog_logger)(unsafe.Pointer(Ctx.logger)))
return
}
err = Error(-ret)
return
}
- defer C.free(cpath)
+ defer C.free(unsafe.Pointer(cpath))
path = C.GoString(cpath)
return
err = Error(-ret)
return
}
- defer C.free(cpath)
+ defer C.free(unsafe.Pointer(cpath))
path = C.GoString(cpath)
return