Skip to content

Commit ee9066c

Browse files
committed
fix warning on nightly rust about extern usage
1 parent 2b9ccf2 commit ee9066c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/npyffi/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ macro_rules! impl_api {
5353
[$offset: expr; $fname: ident ($($arg: ident: $t: ty),* $(,)?) $(-> $ret: ty)?] => {
5454
#[allow(non_snake_case)]
5555
pub unsafe fn $fname<'py>(&self, py: Python<'py>, $($arg : $t), *) $(-> $ret)* {
56-
let fptr = self.get(py, $offset) as *const extern fn ($($arg : $t), *) $(-> $ret)*;
56+
let fptr = self.get(py, $offset) as *const extern "C" fn ($($arg : $t), *) $(-> $ret)*;
5757
(*fptr)($($arg), *)
5858
}
5959
};
@@ -69,7 +69,7 @@ macro_rules! impl_api {
6969
API_VERSION_2_0,
7070
*API_VERSION.get(py).expect("API_VERSION is initialized"),
7171
);
72-
let fptr = self.get(py, $offset) as *const extern fn ($($arg: $t), *) $(-> $ret)*;
72+
let fptr = self.get(py, $offset) as *const extern "C" fn ($($arg: $t), *) $(-> $ret)*;
7373
(*fptr)($($arg), *)
7474
}
7575

@@ -84,7 +84,7 @@ macro_rules! impl_api {
8484
API_VERSION_2_0,
8585
*API_VERSION.get(py).expect("API_VERSION is initialized"),
8686
);
87-
let fptr = self.get(py, $offset) as *const extern fn ($($arg: $t), *) $(-> $ret)*;
87+
let fptr = self.get(py, $offset) as *const extern "C" fn ($($arg: $t), *) $(-> $ret)*;
8888
(*fptr)($($arg), *)
8989
}
9090

0 commit comments

Comments
 (0)