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

Function txt2obj

crates/stdlib/src/openssl.rs:419–424  ·  view source on GitHub ↗
(args: Txt2ObjArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

417
418 #[pyfunction]
419 fn txt2obj(args: Txt2ObjArgs, vm: &VirtualMachine) -> PyResult<PyNid> {
420 _txt2obj(&args.txt.to_cstring(vm)?, !args.name)
421 .as_deref()
422 .ok_or_else(|| vm.new_value_error(format!("unknown object '{}'", args.txt)))
423 .and_then(|obj| obj2py(obj, vm))
424 }
425
426 #[pyfunction]
427 fn nid2obj(nid: libc::c_int, vm: &VirtualMachine) -> PyResult<PyNid> {

Callers

nothing calls this directly

Calls 4

_txt2objFunction · 0.85
obj2pyFunction · 0.85
ok_or_elseMethod · 0.80
to_cstringMethod · 0.45

Tested by

no test coverage detected