Public API functions which are exposed to the user, e.g.
HPyType_FromSpec. Generally speaking they are thin shims dispatching to the actual implementation:
In CPython-ABI mode they directly call the corresponding Py* or
In Universal-ABI mode, they always resolve to an indirect call through
HPyContext *, i.e.
ctx->ctx_Add(...), which on CPython dispaches to
These functions are part of the public API but not of the ABI. They are helpers which are meant to be compiled togeher with every extension. E.g.
CPython implementations for
HPyAPI_FUNCfunctions. Generally speaking, they are put in ctx_*.c files and they are prefixed by ctx_.
Some of these functions are needed by the CPython ABI mode, and by CPython’s implementation of hpy.universal: these can be found in hpy/devel/src/runtime/ctx_*.c, e.g.
Some other are used ONLY by
hpy.universaland can be found in hpy/universal/src/ctx_*.c.