MCPcopy Index your code
hub / github.com/python/mypy / emit_unbox_failure_with_overlapping_error_value

Method emit_unbox_failure_with_overlapping_error_value

mypyc/codegen/emit.py:1418–1423  ·  view source on GitHub ↗
(
        self, dest: str, typ: RType, failure: str
    )

Source from the content-addressed store, hash-verified

1416 self.emit_line('assert(PyErr_Occurred() != NULL && "failure w/o err!");')
1417
1418 def emit_unbox_failure_with_overlapping_error_value(
1419 self, dest: str, typ: RType, failure: str
1420 ) -> None:
1421 self.emit_line(f"if ({dest} == {self.c_error_value(typ)} && PyErr_Occurred()) {{")
1422 self.emit_line(failure)
1423 self.emit_line("}")
1424
1425 def emit_cpyfunction_instance(
1426 self, fn: FuncIR, name: str, filepath: str, error_stmt: str

Callers 1

emit_unboxMethod · 0.95

Calls 2

emit_lineMethod · 0.95
c_error_valueMethod · 0.95

Tested by

no test coverage detected