Migrate windows-targets to Rust 2024
This commit is contained in:
parent
ba06ce6114
commit
b130747e92
2 changed files with 3 additions and 3 deletions
|
|
@ -2,7 +2,7 @@
|
|||
name = "windows-targets"
|
||||
description = "A drop-in replacement for the real windows-targets crate for use in std only."
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[features]
|
||||
# Enable using raw-dylib for Windows imports.
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ pub macro link {
|
|||
($library:literal $abi:literal $($link_name:literal)? $(#[$doc:meta])? fn $($function:tt)*) => (
|
||||
#[cfg_attr(not(target_arch = "x86"), link(name = $library, kind = "raw-dylib", modifiers = "+verbatim"))]
|
||||
#[cfg_attr(target_arch = "x86", link(name = $library, kind = "raw-dylib", modifiers = "+verbatim", import_name_type = "undecorated"))]
|
||||
extern $abi {
|
||||
unsafe extern $abi {
|
||||
$(#[link_name=$link_name])?
|
||||
pub fn $($function)*;
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ pub macro link {
|
|||
// libraries below by using an empty extern block. This works because extern blocks are not
|
||||
// connected to the library given in the #[link] attribute.
|
||||
#[link(name = "kernel32")]
|
||||
extern $abi {
|
||||
unsafe extern $abi {
|
||||
$(#[link_name=$link_name])?
|
||||
pub fn $($function)*;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue