From b9dabf4da9c97d0d43cc4b2fba40108928336a13 Mon Sep 17 00:00:00 2001 From: Sebastian Zagrodzki Date: Thu, 27 Apr 2017 03:12:06 +0200 Subject: [PATCH] Add a method to return a fake allocated transfer. --- usb/libusb.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usb/libusb.go b/usb/libusb.go index d6d6136..9b9dbb6 100644 --- a/usb/libusb.go +++ b/usb/libusb.go @@ -451,3 +451,7 @@ func libusbSetDebug(c *libusbContext, lvl int) { func newDevicePointer() *libusbDevice { return (*libusbDevice)(unsafe.Pointer(C.malloc(1))) } + +func newFakeTransferPointer() *libusbTransfer { + return (*libusbTransfer)(unsafe.Pointer(C.malloc(1))) +}