(code: OptionalArg<PyObjectRef>, vm: &VirtualMachine)
| 794 | |
| 795 | #[pyfunction] |
| 796 | fn exit(code: OptionalArg<PyObjectRef>, vm: &VirtualMachine) -> PyResult { |
| 797 | let status = code.unwrap_or_none(vm); |
| 798 | let args = if let Some(status_tuple) = status.downcast_ref::<PyTuple>() { |
| 799 | status_tuple.as_slice().to_vec() |
| 800 | } else { |
| 801 | vec![status] |
| 802 | }; |
| 803 | let exc = vm.invoke_exception(vm.ctx.exceptions.system_exit.to_owned(), args)?; |
| 804 | Err(exc) |
| 805 | } |
| 806 | |
| 807 | #[pyfunction] |
| 808 | fn call_tracing(func: PyObjectRef, args: PyTupleRef, vm: &VirtualMachine) -> PyResult { |
nothing calls this directly
no test coverage detected