woodemi / libusb.dart

Dart wrapper via dart:ffi for https://github.com/libusb/libusb
BSD 3-Clause "New" or "Revised" License
40 stars 23 forks source link

[generation] unavailable inline C function #10

Open Sunbreak opened 3 years ago

Sunbreak commented 3 years ago

For example:

https://github.com/woodemi/libusb.dart/blob/7f7ed5fa9abd7c7804c861f6be060a11ce5f8bc8/libusb-1.0/libusb.h#L161-L178

results

https://github.com/woodemi/libusb.dart/blob/7f7ed5fa9abd7c7804c861f6be060a11ce5f8bc8/lib/libusb_macos.dart#L587-L602

which doen't exist in dynamic library


Calling it would throw ArgumentError

https://github.com/woodemi/libusb.dart/blob/b67b2f77928cd7064bde208605e0472d01c1f66f/test/libusb_test.dart#L32-L34

Marked those inline functions @Deprecated('inline') as a workaround

Sunbreak commented 3 years ago

Solved since https://github.com/woodemi/libusb.dart/releases/tag/0.3.23-nullsafety.0

Remain opened until nullable version deprecated