8000 Bump shutil to 3.12.3 by moreal · Pull Request #5228 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

Bump shutil to 3.12.3 #5228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add _winapi.NeedCurrentDirectoryForExePath
  • Loading branch information
youknowone committed Apr 16, 2024
commit e9b41911ad683c1288be81078fdea15f295c5907
1 change: 1 addition & 0 deletions stdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ features = [
"Win32_NetworkManagement_IpHelper",
"Win32_NetworkManagement_Ndis",
"Win32_Security_Cryptography",
"Win32_System_Environment",
]

[target.'cfg(target_os = "macos")'.dependencies]
Expand Down
11 changes: 11 additions & 0 deletions vm/src/stdlib/winapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ mod _winapi {
))
}

#[pyfunction]
fn NeedCurrentDirectoryForExePath(exe_name: PyStrRef) -> bool {
let exe_name = exe_name.as_str().to_wides_with_nul();
let return_value = unsafe {
windows_sys::Win32::System::Environment::NeedCurrentDirectoryForExePathW(
exe_name.as_ptr(),
)
};
return_value != 0
}

fn getenvironment(env: ArgMapping, vm: &VirtualMachine) -> PyResult<Vec<u16>> {
let keys = env.mapping().keys(vm)?;
let values = env.mapping().values(vm)?;
Expand Down
0