I am writing a Python 3 C extension where I want to use a MappingProxyType (from types import MappingProxyType
). From what I saw in the Cpython source code, MappingProxyType is written in Python and not in C.
How can I use this type from C? I imagine there must be something like an C-level "import" and then I could find the PyObject (or rather, PyTypeObject) from the name as a C string.