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

Function to_str

crates/vm/src/stdlib/time.rs:287–291  ·  view source on GitHub ↗
(s: *const core::ffi::c_char)

Source from the content-addressed store, hash-verified

285 use crate::builtins::tuple::IntoPyTuple;
286
287 unsafe fn to_str(s: *const core::ffi::c_char) -> String {
288 unsafe { core::ffi::CStr::from_ptr(s) }
289 .to_string_lossy()
290 .into_owned()
291 }
292 unsafe { (to_str(super::c_tzname[0]), to_str(super::c_tzname[1])) }.into_pytuple(vm)
293 }
294

Callers 1

tznameFunction · 0.85

Calls 2

into_ownedMethod · 0.80
to_string_lossyMethod · 0.45

Tested by

no test coverage detected