(
vm: &VirtualMachine,
obj: &PyObject,
field: &'static str,
typ: &str,
)
| 84 | } |
| 85 | |
| 86 | fn get_int_field( |
| 87 | vm: &VirtualMachine, |
| 88 | obj: &PyObject, |
| 89 | field: &'static str, |
| 90 | typ: &str, |
| 91 | ) -> PyResult<PyRefExact<PyInt>> { |
| 92 | get_node_field(vm, obj, field, typ)? |
| 93 | .downcast_exact(vm) |
| 94 | .map_err(|_| vm.new_type_error(format!(r#"field "{field}" must have integer type"#))) |
| 95 | } |
| 96 | |
| 97 | struct PySourceRange { |
| 98 | start: PySourceLocation, |
no test coverage detected