Ticket #85 (new enhancement)
Use size_t instead of int in transfer functions
|Reported by:||www.google.com/accounts/o8/id?id=aitoawlbfa_iwnmgtqit6eck5vjmkejlybqinoe||Owned by:|
The POSIX read and write functions let you specify the number of bytes to transfer as a size_t. These functions return a ssize_t indicating how much bytes were read or written. (The signed type is needed to allow negative error codes.)
As explained in the mailinglist thread, I would like to propose that the libusb transfer functions also use these size_t types instead of ints. Concretely I propose:
ssize_t libusb_control_transfer (...,size_t wLength,...)
int libusb_bulk_transfer (...,size_t length, size_t * transferred,...)
int libusb_interrupt_transfer (...,size_t length, size_t * transferred,...)
Note that the libusb_get_device_list function already returns a ssize_t to indicate the number of devices in the list or an error code.
I'm not familiar enough with the asynchronous API but I suppose that it can also use size_t types instead of ints.