since this is the only usecase, return a *libusbDevice for a new

pointer.
This commit is contained in:
Sebastian Zagrodzki
2017-04-09 00:12:39 +02:00
parent 3ec748db4c
commit ca02c03241
2 changed files with 3 additions and 3 deletions

View File

@@ -426,6 +426,6 @@ func libusbSetDebug(c *libusbContext, lvl int) {
C.libusb_set_debug((*C.libusb_context)(c), C.int(lvl))
}
func newCPointer() unsafe.Pointer {
return unsafe.Pointer(C.malloc(1))
func newDevicePointer() *libusbDevice {
return (*libusbDevice)(unsafe.Pointer(C.malloc(1)))
}