Skip to content

Commit 305f646

Browse files
committed
Use extern "C" instead of extern "cdecl"
1 parent 1c1e563 commit 305f646

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

crates/libs/bindgen/src/tables/method_def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl MethodDef {
5151
if flags.contains(PInvokeAttributes::CallConvPlatformapi) {
5252
"system"
5353
} else if flags.contains(PInvokeAttributes::CallConvCdecl) {
54-
"cdecl"
54+
"C"
5555
} else {
5656
""
5757
}

crates/libs/link/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ macro_rules! link {
3232
#[macro_export]
3333
macro_rules! link {
3434
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
35-
extern $abi {
35+
extern "C" {
3636
pub fn $($function)*;
3737
}
3838
)

crates/libs/targets/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ macro_rules! link {
4545
#[macro_export]
4646
macro_rules! link {
4747
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
48-
extern $abi {
48+
extern "C" {
4949
pub fn $($function)*;
5050
}
5151
)

0 commit comments

Comments
 (0)