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

Function nid2obj

crates/stdlib/src/openssl.rs:427–432  ·  view source on GitHub ↗
(nid: libc::c_int, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

425
426 #[pyfunction]
427 fn nid2obj(nid: libc::c_int, vm: &VirtualMachine) -> PyResult<PyNid> {
428 _nid2obj(Nid::from_raw(nid))
429 .as_deref()
430 .ok_or_else(|| vm.new_value_error(format!("unknown NID {nid}")))
431 .and_then(|obj| obj2py(obj, vm))
432 }
433
434 // Lazily compute and cache cert file/dir paths
435 static CERT_PATHS: LazyLock<(PathBuf, PathBuf)> = LazyLock::new(|| {

Callers

nothing calls this directly

Calls 3

_nid2objFunction · 0.85
obj2pyFunction · 0.85
ok_or_elseMethod · 0.80

Tested by

no test coverage detected