Function pyo3::impl_::pyclass::alloc_with_freelist

source ·
pub unsafe extern "C" fn alloc_with_freelist<T: PyClassWithFreeList>(
    subtype: *mut PyTypeObject,
    nitems: Py_ssize_t
) -> *mut PyObject
Expand description

Implementation of tp_alloc for freelist classes.

§Safety

  • subtype must be a valid pointer to the type object of T or a subclass.
  • The GIL must be held.
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here