unsafe fn trampoline_unraisable<F>(body: F, ctx: *mut PyObject)
Expand description
Implementation of trampoline for functions which can’t return an error.
Panics during execution are trapped so that they don’t propagate through any outer FFI boundary.
Exceptions produced are sent to sys.unraisablehook
.
§Safety
- ctx must be either a valid ffi::PyObject or NULL
- The GIL must already be held when this is called.