]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45316: Move private PyCode C API to internal C API (GH-31576)
authorVictor Stinner <vstinner@python.org>
Fri, 25 Feb 2022 14:41:32 +0000 (15:41 +0100)
committerGitHub <noreply@github.com>
Fri, 25 Feb 2022 14:41:32 +0000 (15:41 +0100)
commit4a0c7a1aacd08cead7717479620e62359c828e88
treeb063780754c9919fd7f468c8d30f027b3c0c765e
parentc579243eb62d3182c84004cd72dcf6ef59100643
bpo-45316: Move private PyCode C API to internal C API (GH-31576)

Rename private functions (no exported), add an underscore prefix:

* PyLineTable_InitAddressRange() => _PyLineTable_InitAddressRange()
* PyLineTable_NextAddressRange() => _PyLineTable_NextAddressRange()
* PyLineTable_PreviousAddressRange() => _PyLineTable_PreviousAddressRange()

Move private functions to the internal C API:

* _PyCode_Addr2EndLine()
* _PyCode_Addr2EndOffset()
* _PyCode_Addr2Offset()
* _PyCode_InitAddressRange()
* _PyCode_InitEndAddressRange(
* _PyLineTable_InitAddressRange()
* _PyLineTable_NextAddressRange()
* _PyLineTable_PreviousAddressRange()

No longer export the following internal functions:

* _PyCode_GetVarnames()
* _PyCode_GetCellvars()
* _PyCode_GetFreevars()
* _Py_GetSpecializationStats()

Add "extern" to pycore_code.h functions to identify them more easiliy
(they are still not exported).
Include/cpython/code.h
Include/internal/pycore_code.h
Objects/codeobject.c
Objects/frameobject.c