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

Function tzname

crates/vm/src/stdlib/time.rs:284–293  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

282 #[cfg(not(target_arch = "wasm32"))]
283 #[pyattr]
284 fn tzname(vm: &VirtualMachine) -> crate::builtins::PyTupleRef {
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
295 #[cfg(target_env = "msvc")]
296 #[cfg(not(target_arch = "wasm32"))]

Callers

nothing calls this directly

Calls 3

to_strFunction · 0.85
get_tz_infoFunction · 0.85
into_pytupleMethod · 0.80

Tested by

no test coverage detected