-
Notifications
You must be signed in to change notification settings - Fork 746
Bindgen generates wrong bingings for function #1778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
And there's no |
This seems similar to some other issues where libclang doesn't expose the arguments probably, then bindgen tries to guess from the AST, but it still fails because of macros. Can you paste a definition of Thanks for filing! |
Ah, apparently |
You need to find where |
There's void. |
No, I know what It seems |
So something like this should do: #define VOID void
#define CALLBACK __stdcall
#define UCHAR unsigned char
typedef
VOID CALLBACK
EVT_VIGEM_X360_NOTIFICATION(
void* Client,
void* Target,
UCHAR LargeMotor,
UCHAR SmallMotor,
UCHAR LedNumber,
void* UserData
);
typedef EVT_VIGEM_X360_NOTIFICATION *PFN_VIGEM_X360_NOTIFICATION; |
This is a libclang bug, https://bugs.llvm.org/show_bug.cgi?id=45919. But we can workaround it in bindgen to some extent. |
…cls. It seems libclang sometimes doesn't expose the right paramdecl cursors. This should be reported upstream, but it's easy enough to workaround. It loses the parameter names which is a bit unfortunate but... Fixes #1778
I have not checked it yet, but thank you! |
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
In rust bindings, there's function with no params, but as we can see in CPP code - there's a lot of params.
By the way, bindings
headers
The text was updated successfully, but these errors were encountered: