-
Notifications
You must be signed in to change notification settings - Fork 71
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
generated bindings should use extern "system"
instead of extern "C"
#156
Comments
Are you encountering any buggy behavior that is affected by this? Technically, I think the most correct solution here is that bindgen generates
Functionally, there should be no difference in behavior here because on ARM and x64 processors, |
@wmmc88, sure, there are no problems in x64, but for the correctness it would be great to use "stdcall" or "system" as you stated above - for example, for cases of building a 32-bit driver for legacy Windows. And just because it's just correct 🙂 |
extern "C"
?extern "system"
instead of extern "C"
Per our current support policy:
Since NI WDK (22H2) does not support 32-bit drivers, we do not currently have plans to support this scenario. However, if the change to emit |
As we know, almost all Windows functions have
stdcall
convention, so, this is strange that all generated bindings are marked asextern "C"
. It seems that the convention should be changed toextern "stdcall"
, isn't it? Of course, for functions that are really "stdcall".For example,
ZwCreateFile
.It has the following prototype:
The text was updated successfully, but these errors were encountered: