Skip to content

Commit 6d9bd4c

Browse files
committed
fix
1 parent fe80b32 commit 6d9bd4c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

crates/vm/src/stdlib/os.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ impl ToPyObject for crt_fd::Borrowed<'_> {
152152
#[pymodule(sub)]
153153
pub(super) mod _os {
154154
use super::{DirFd, FollowSymlinks, SupportFunc, errno_err};
155+
#[cfg(windows)]
156+
use crate::common::windows::ToWideString;
155157
use crate::{
156158
AsObject, Py, PyObjectRef, PyPayload, PyRef, PyResult, TryFromObject,
157159
builtins::{
@@ -162,7 +164,6 @@ pub(super) mod _os {
162164
fileutils::StatStruct,
163165
lock::{OnceCell, PyRwLock},
164166
suppress_iph,
165-
windows::ToWideString,
166167
},
167168
convert::{IntoPyException, ToPyObject},
168169
function::{ArgBytesLike, Either, FsPath, FuncArgs, OptionalArg},

crates/vm/src/stdlib/sys.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ mod sys {
1212
common::{
1313
ascii,
1414
hash::{PyHash, PyUHash},
15-
windows::ToWideString,
1615
},
1716
convert::ToPyObject,
1817
frame::FrameRef,
@@ -550,6 +549,7 @@ mod sys {
550549

551550
#[cfg(windows)]
552551
fn get_kernel32_version() -> std::io::Result<(u32, u32, u32)> {
552+
use crate::common::windows::ToWideString;
553553
unsafe {
554554
// Create a wide string for "kernel32.dll"
555555
let module_name: Vec<u16> = std::ffi::OsStr::new("kernel32.dll").to_wide_with_nul();

0 commit comments

Comments
 (0)