Skip to main content

tp_new_impl

Function tp_new_impl 

Source
pub unsafe fn tp_new_impl<'py, InitializerT, ClassT>(
    py: Python<'py>,
    initializer: InitializerT,
    cls: *mut PyTypeObject,
) -> PyResult<*mut PyObject>
where InitializerT: PyClassInit<'py, ClassT>,
Expand description

§SAFETY

  • cls must be the type object for ClassT (or a subclass)
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here