mirror of
https://github.com/python/cpython.git
synced 2025-10-27 16:57:08 +00:00
gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763)
When Python is built in debug mode (if the Py_REF_DEBUG macro is defined), the Py_INCREF() and Py_DECREF() function are now always implemented as opaque functions to avoid leaking implementation details like the "_Py_RefTotal" variable or the _Py_DecRefTotal_DO_NOT_USE_THIS() function. * Remove _Py_IncRefTotal_DO_NOT_USE_THIS() and _Py_DecRefTotal_DO_NOT_USE_THIS() from the stable ABI. * Remove _Py_NegativeRefcount() from limited C API.
This commit is contained in:
parent
bae415ad02
commit
92022d8416
5 changed files with 17 additions and 27 deletions
|
|
@ -343,6 +343,15 @@ Build Changes
|
|||
:file:`!configure`.
|
||||
(Contributed by Christian Heimes in :gh:`89886`.)
|
||||
|
||||
* C extensions built with the :ref:`limited C API <limited-c-api>`
|
||||
on :ref:`Python build in debug mode <debug-build>` no longer support Python
|
||||
3.9 and older. In this configuration, :c:func:`Py_INCREF` and
|
||||
:c:func:`Py_DECREF` are now always implemented as opaque function calls,
|
||||
but the called functions were added to Python 3.10. Build C extensions
|
||||
with a release build of Python or with Python 3.12 and older, to keep support
|
||||
for Python 3.9 and older.
|
||||
(Contributed by Victor Stinner in :gh:`102304`.)
|
||||
|
||||
|
||||
C API Changes
|
||||
=============
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue