Skip to main content

alloc_with_freelist

Function 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 calling thread must be attached to the interpreter
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here