Skip to content

Commit 861055f

Browse files
authored
Add nt constants (RustPython#5676)
1 parent 3c6bc2c commit 861055f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎vm/src/stdlib/nt.rs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ pub(crate) mod module {
3737
use libc::{O_BINARY, O_TEMPORARY};
3838

3939
#[pyattr]
40-
const _LOAD_LIBRARY_SEARCH_DEFAULT_DIRS: i32 = 4096;
40+
use windows_sys::Win32::System::LibraryLoader::{
41+
LOAD_LIBRARY_SEARCH_APPLICATION_DIR as _LOAD_LIBRARY_SEARCH_APPLICATION_DIR,
42+
LOAD_LIBRARY_SEARCH_DEFAULT_DIRS as _LOAD_LIBRARY_SEARCH_DEFAULT_DIRS,
43+
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR as _LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR,
44+
LOAD_LIBRARY_SEARCH_SYSTEM32 as _LOAD_LIBRARY_SEARCH_SYSTEM32,
45+
LOAD_LIBRARY_SEARCH_USER_DIRS as _LOAD_LIBRARY_SEARCH_USER_DIRS,
46+
};
4147

4248
#[pyfunction]
4349
pub(super) fn access(path: OsPath, mode: u8, vm: &VirtualMachine) -> PyResult<bool> {

0 commit comments

Comments
 (0)