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

Method to_cstring

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

Source from the content-addressed store, hash-verified

113 }
114
115 pub fn to_cstring(&self, vm: &VirtualMachine) -> PyResult<alloc::ffi::CString> {
116 alloc::ffi::CString::new(self.as_bytes()).map_err(|e| e.into_pyexception(vm))
117 }
118
119 #[cfg(windows)]
120 pub fn to_wide_cstring(&self, vm: &VirtualMachine) -> PyResult<widestring::WideCString> {

Callers 15

txt2objFunction · 0.45
set_ecdh_curveMethod · 0.45
openlogFunction · 0.45
syslogFunction · 0.45
getservbynameFunction · 0.45
getservbyportFunction · 0.45
getprotobynameFunction · 0.45
if_nametoindexFunction · 0.45
complete_statementFunction · 0.45
initialize_dbMethod · 0.45
blobopenMethod · 0.45
backupMethod · 0.45

Calls 3

newFunction · 0.85
as_bytesMethod · 0.45
into_pyexceptionMethod · 0.45

Tested by

no test coverage detected