Recent

Author Topic: [BUG REPORT] libusb's function libusb_get_version() Doesn't work  (Read 1118 times)

gasensor

  • Jr. Member
  • **
  • Posts: 76
libusb's function libusb_get_version() Doesn't work

in /fpcsrc/packages/libusb/src/libusb.pp  line1138:

Code: Pascal  [Select][+][-]
  1.  function libusb_get_version():libusb_version;LIBUSB_CALL;external libusb1;

"libusb_version" should be "plibusb_version"

The return value should be a pointer rather than a structure value.

https://gitlab.com/freepascal.org/fpc/source/-/issues/40829


Libusb does not have an example project, which is difficult for beginners to use.
« Last Edit: June 24, 2024, 02:11:48 pm by gasensor »

Zvoni

  • Hero Member
  • *****
  • Posts: 2472
Re: [BUG REPORT] libusb's function libusb_get_version() Doesn't work
« Reply #1 on: June 24, 2024, 02:43:18 pm »
Agreed.

https://libusb.sourceforge.io/api-1.0/group__libusb__misc.html#ga61d07b01404fdea080cd16c1ed8be93d

Quote
const struct libusb_version *    libusb_get_version (void)
    Returns a pointer to const struct libusb_version with the version (major, minor, micro, nano and rc) of the running library.
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018