mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Use PyPathLike::into_cstring
This commit is contained in:
@@ -1278,7 +1278,10 @@ pub mod module {
|
||||
fn spawn(self, spawnp: bool, vm: &VirtualMachine) -> PyResult<libc::pid_t> {
|
||||
use crate::TryFromBorrowedObject;
|
||||
|
||||
let path = CString::new(self.path.clone().into_bytes())
|
||||
let path = self
|
||||
.path
|
||||
.clone()
|
||||
.into_cstring(vm)
|
||||
.map_err(|_| vm.new_value_error("path should not have nul bytes".to_owned()))?;
|
||||
|
||||
let mut file_actions = unsafe {
|
||||
|
||||
Reference in New Issue
Block a user