Note that in the two examples above, the buffer is always
manipulated via functions belonging to the same set. Indeed, it
is required to use the same memory API family for a given
memory block, so that the risk of mixing different allocators is
reduced to a minimum. The following code sequence contains two errors,
one of which is labeled as fatal because it mixes two different
allocators operating on different heaps.

In addition to the functions aimed at handling raw memory blocks from
the Python heap, objects in Python are allocated and released with
PyObject_New(), PyObject_NewVar() and
PyObject_Del(), or with their corresponding macros
PyObject_NEW(), PyObject_NEW_VAR() and
PyObject_DEL().

These will be explained in the next chapter on defining and
implementing new object types in C.