mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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).
This commit is contained in:
parent
c579243eb6
commit
4a0c7a1aac
4 changed files with 56 additions and 49 deletions
|
@ -377,9 +377,9 @@ marklines(PyCodeObject *code, int len)
|
|||
linestarts[i] = -1;
|
||||
}
|
||||
|
||||
while (PyLineTable_NextAddressRange(&bounds)) {
|
||||
assert(bounds.ar_start/(int)sizeof(_Py_CODEUNIT) < len);
|
||||
linestarts[bounds.ar_start/sizeof(_Py_CODEUNIT)] = bounds.ar_line;
|
||||
while (_PyLineTable_NextAddressRange(&bounds)) {
|
||||
assert(bounds.ar_start / (int)sizeof(_Py_CODEUNIT) < len);
|
||||
linestarts[bounds.ar_start / sizeof(_Py_CODEUNIT)] = bounds.ar_line;
|
||||
}
|
||||
return linestarts;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue