diff options
author | Christian Poveda Ruiz <31802960+pvdrz@users.noreply.github.com> | 2022-11-02 15:30:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 15:30:34 -0500 |
commit | 9c32b460481903d90c6ac5df277bfa853a0558d8 (patch) | |
tree | 6ee9ed2f853a78942314fb71df3868b89125cc86 /bindgen-tests | |
parent | a673a6bc9b83675a7468379e79dcf5d5659c4623 (diff) |
Add the `--override-abi` option (#2329)
* Add the `--override-abi` option.
This option can be used from the CLI with the <abi>:<regex> syntax and
it overrides the ABI of a function if it matches <regex>.
Fixes #2257
Diffstat (limited to 'bindgen-tests')
-rw-r--r-- | bindgen-tests/tests/expectations/tests/abi-override.rs | 16 | ||||
-rw-r--r-- | bindgen-tests/tests/headers/abi-override.h | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/bindgen-tests/tests/expectations/tests/abi-override.rs b/bindgen-tests/tests/expectations/tests/abi-override.rs new file mode 100644 index 00000000..49693692 --- /dev/null +++ b/bindgen-tests/tests/expectations/tests/abi-override.rs @@ -0,0 +1,16 @@ +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] + +extern "fastcall" { + pub fn foo(); +} +extern "stdcall" { + pub fn bar(); +} +extern "C" { + pub fn baz(); +} diff --git a/bindgen-tests/tests/headers/abi-override.h b/bindgen-tests/tests/headers/abi-override.h new file mode 100644 index 00000000..cee72cae --- /dev/null +++ b/bindgen-tests/tests/headers/abi-override.h @@ -0,0 +1,5 @@ +// bindgen-flags: --override-abi=foo=fastcall --override-abi=bar=stdcall + +void foo(); +void bar(); +void baz(); |