(nid: i32, vm: &VirtualMachine)
| 4807 | |
| 4808 | #[pyfunction] |
| 4809 | fn nid2obj(nid: i32, vm: &VirtualMachine) -> PyResult<PyObjectRef> { |
| 4810 | let entry = oid::find_by_nid(nid) |
| 4811 | .ok_or_else(|| vm.new_value_error(format!("unknown NID {nid}")))?; |
| 4812 | |
| 4813 | // Return tuple: (nid, shortname, longname, oid) |
| 4814 | Ok(vm |
| 4815 | .new_tuple(( |
| 4816 | vm.ctx.new_int(entry.nid), |
| 4817 | vm.ctx.new_str(entry.short_name), |
| 4818 | vm.ctx.new_str(entry.long_name), |
| 4819 | vm.ctx.new_str(entry.oid_string()), |
| 4820 | )) |
| 4821 | .into()) |
| 4822 | } |
| 4823 | |
| 4824 | #[pyfunction] |
| 4825 | fn get_default_verify_paths(vm: &VirtualMachine) -> PyResult<PyObjectRef> { |
nothing calls this directly
no test coverage detected