MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / new_helper

Method new_helper

src/err.rs:247–254  ·  view source on GitHub ↗
(_py: Python, ty: PyType, value: PyObject)

Source from the content-addressed store, hash-verified

245 }
246
247 fn new_helper(_py: Python, ty: PyType, value: PyObject) -> PyErr {
248 assert!(unsafe { ffi::PyExceptionClass_Check(ty.as_object().as_ptr()) } != 0);
249 PyErr {
250 ptype: ty.into_object(),
251 pvalue: Some(value),
252 ptraceback: None,
253 }
254 }
255
256 /// Creates a new PyErr.
257 ///

Callers

nothing calls this directly

Calls 1

into_objectMethod · 0.45

Tested by

no test coverage detected