MCPcopy Index your code
hub / github.com/RustPython/RustPython / to_wide_cstring

Method to_wide_cstring

crates/vm/src/function/fspath.rs:120–123  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

118
119 #[cfg(windows)]
120 pub fn to_wide_cstring(&self, vm: &VirtualMachine) -> PyResult<widestring::WideCString> {
121 widestring::WideCString::from_os_str(self.as_os_str(vm)?)
122 .map_err(|err| err.into_pyexception(vm))
123 }
124
125 pub fn bytes_as_os_str<'a>(b: &'a [u8], vm: &VirtualMachine) -> PyResult<&'a std::ffi::OsStr> {
126 rustpython_common::os::bytes_as_os_str(b)

Callers 15

accessFunction · 0.45
removeFunction · 0.45
symlinkFunction · 0.45
win32_lchmodFunction · 0.45
chmodFunction · 0.45
_path_isdevdriveFunction · 0.45
spawnvFunction · 0.45
spawnveFunction · 0.45
execvFunction · 0.45
execveFunction · 0.45
_getfinalpathnameFunction · 0.45
_getfullpathnameFunction · 0.45

Calls 2

as_os_strMethod · 0.80
into_pyexceptionMethod · 0.45

Tested by

no test coverage detected