mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2025-02-23 01:39:58 +08:00
add .chain(Some(0))
This commit is contained in:
parent
d94841b1bd
commit
e5f67475db
|
@ -439,18 +439,18 @@ pub fn init_py() {
|
|||
#[cfg(target_os = "windows")]
|
||||
use std::os::windows::ffi::OsStrExt;
|
||||
|
||||
let wide_path = OsStr::new(&virtual_env).encode_wide().collect::<Vec<u16>>();
|
||||
let wide_path = OsStr::new(&virtual_env).encode_wide().chain(Some(0)).collect::<Vec<u16>>();
|
||||
|
||||
// 设置 prefix 和 exec_prefix
|
||||
pyo3::ffi::PyConfig_SetString(
|
||||
config_ptr,
|
||||
&mut config.prefix as *mut _,
|
||||
wide_path.as_ptr() as *mut _,
|
||||
wide_path.as_slice().as_ptr(),
|
||||
);
|
||||
pyo3::ffi::PyConfig_SetString(
|
||||
config_ptr,
|
||||
&mut config.exec_prefix as *mut _,
|
||||
wide_path.as_ptr() as *mut _,
|
||||
wide_path.as_slice().as_ptr(),
|
||||
);
|
||||
|
||||
// init py
|
||||
|
|
Loading…
Reference in New Issue
Block a user