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 thread must be attached to the interpreter when this is called.