cpython
cpython copied to clipboard
3.13 adds C macros/functions/types without the `Py`/`_Py` prefix
3.13 newly defines the following unprefixed functions/macros/types via Python.h. They should probably be hidden:
- [x]
uop_get_targetinInclude/cpython/optimizer.h:67 - [x]
uop_get_exit_indexinInclude/cpython/optimizer.h:73 - [x]
uop_get_jump_targetinInclude/cpython/optimizer.h:79 - [x]
uop_get_error_targetinInclude/cpython/optimizer.h:85 - [x]
BLOOM_FILTER_WORDSinInclude/cpython/optimizer.h - [x]
UOP_FORMAT_TARGETinInclude/cpython/optimizer.h - [x]
UOP_FORMAT_EXITinInclude/cpython/optimizer.h - [x]
UOP_FORMAT_JUMPinInclude/cpython/optimizer.h - [x]
UOP_FORMAT_UNUSEDinInclude/cpython/optimizer.h - [x]
struct _bloom_filterinInclude/cpython/optimizer.h:19 - [x]
struct _exit_datainInclude/cpython/optimizer.h:91 - [x]
optimize_funcinInclude/cpython/optimizer.h:112 - [ ]
CO_NO_MONITORING_EVENTSinInclude/cpython/code.h:192
Some more are generated by configure:
- [ ]
HAVE_CLOCK_Tin./pyconfig.h:138 - [ ]
HAVE_CLOSEFROMin./pyconfig.h:138 - [ ]
HAVE_GETGRENTin./pyconfig.h:138 - [ ]
HAVE_GRANTPTin./pyconfig.h:515 - [ ]
HAVE_POSIX_OPENPTin./pyconfig.h:849 - [ ]
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NPin./pyconfig.h:849 - [ ]
HAVE_PROCESS_VM_READVin./pyconfig.h:849 - [ ]
HAVE_PTSNAMEin./pyconfig.h:957 - [ ]
HAVE_PTSNAME_Rin./pyconfig.h:957 - [ ]
HAVE_SOCKLEN_Tin./pyconfig.h:957 - [ ]
HAVE_SYS_TIMERFD_Hin./pyconfig.h:1406 - [ ]
HAVE_TIMERFD_CREATEin./pyconfig.h:1406 - [ ]
HAVE_UNLOCKPTin./pyconfig.h:1406 - [ ]
HAVE___UINT128_Tin./pyconfig.h:1582 - [ ]
WITH_MIMALLOCin./pyconfig.h:1867
Linked PRs
- gh-118825
Can't we move most of Include/cpython/optimizer.h contents to the internal C API? Is there a reason to expose it? I mean, the private functions (named prefixed by _Py).