Pre-PEP: use a header file that can undefine the macros defined by <Python.h>

Just for fun, I have applied readelf to my python3.15.a that I have built a few weeks ago.

I found many symbols from mimalloc that are prefixed with _mi or mi.

Additionally, I found the following symbols (mostly for global objects) that are not prefixed with Py or _Py:

bufferedrandom_spec
bufferedreader_spec
bufferedrwpair_spec
bufferedwriter_spec
bytesiobuf_spec
bytesio_spec
constevaluator_spec
fileio_spec
generic_spec
iobase_spec
nldecoder_spec
paramspecargs_spec
paramspeckwargs_spec
paramspec_spec
pkgcontext
PY_TIMEOUT_MAX     # I did not filter for PY with capital Y
rawiobase_spec
stringio_spec
textiobase_spec
textiowrapper_slots
textiowrapper_spec
typevar_spec
typevartuple_slots
typevartuple_spec
2 Likes