cpyext is the implementation of the C API in PyPy.
See Ronan Lamy's talk Adventures in compatibility emulating CPython's C API in PyPy (YouTube video) at EuroPython 2018.
See pypy/module/cpyext/ and cpyext/stubs.py.
cpyext has unit tests written in Python.
PyPy with cpyext remains slower than CPython.
XXX how much?
See :ref:`Borrowed references <borrowed-ref>`.
Already done in cpyext.