File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed
Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ macro_rules! link {
3232#[ macro_export]
3333macro_rules! link {
3434 ( $library: literal $abi: literal $( $link_name: literal) ? fn $( $function: tt) * ) => (
35- extern "C" {
35+ extern $abi {
3636 pub fn $( $function) * ;
3737 }
3838 )
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ macro_rules! link {
2828}
2929
3030/// Defines an external function to import.
31- #[ cfg( all( windows, not( windows_raw_dylib) , target_arch = "x86" ) ) ]
31+ #[ cfg( all( windows, not( windows_raw_dylib) ) ) ]
3232#[ macro_export]
3333macro_rules! link {
3434 ( $library: literal $abi: literal $( $link_name: literal) ? fn $( $function: tt) * ) => (
@@ -40,25 +40,12 @@ macro_rules! link {
4040 )
4141}
4242
43- /// Defines an external function to import.
44- #[ cfg( all( windows, not( windows_raw_dylib) , not( target_arch = "x86" ) ) ) ]
45- #[ macro_export]
46- macro_rules! link {
47- ( $library: literal $abi: literal $( $link_name: literal) ? fn $( $function: tt) * ) => (
48- #[ link( name = "windows.0.53.0" ) ]
49- extern "C" {
50- $( #[ link_name=$link_name] ) ?
51- pub fn $( $function) * ;
52- }
53- )
54- }
55-
5643/// Defines an external function to import.
5744#[ cfg( all( not( windows) , not( windows_raw_dylib) ) ) ]
5845#[ macro_export]
5946macro_rules! link {
6047 ( $library: literal $abi: literal $( $link_name: literal) ? fn $( $function: tt) * ) => (
61- extern "C" {
48+ extern $abi {
6249 pub fn $( $function) * ;
6350 }
6451 )
You can’t perform that action at this time.
0 commit comments