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.