Migrate cranelift-jit from winapi to windows-sys (#4363)

* Migrate cranelift-jit from `winapi` to `windows-sys`

Following up on #4346, this migrates one more place in the tree from
winapi to windows-sys.
This commit is contained in:
Dan Gohman
2022-07-01 08:41:02 -07:00
committed by GitHub
parent ec83144c88
commit 64759f04a4
4 changed files with 20 additions and 10 deletions

View File

@@ -62,8 +62,9 @@ impl PtrLen {
#[cfg(target_os = "windows")]
fn with_size(size: usize) -> io::Result<Self> {
use winapi::um::memoryapi::VirtualAlloc;
use winapi::um::winnt::{MEM_COMMIT, MEM_RESERVE, PAGE_READWRITE};
use windows_sys::Win32::System::Memory::{
VirtualAlloc, MEM_COMMIT, MEM_RESERVE, PAGE_READWRITE,
};
// VirtualAlloc always rounds up to the next multiple of the page size
let ptr = unsafe {