mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-43688: Support the limited C API in debug mode (GH-25131)
The limited C API is now supported if Python is built in debug mode (if the Py_DEBUG macro is defined). In the limited C API, the Py_INCREF() and Py_DECREF() functions are now implemented as opaque function calls, rather than accessing directly the PyObject.ob_refcnt member, if Python is built in debug mode and the Py_LIMITED_API macro targets Python 3.10 or newer. It became possible to support the limited C API in debug mode because the PyObject structure is the same in release and debug mode since Python 3.8 (see bpo-36465). The limited C API is still not supported in the --with-trace-refs special build (Py_TRACE_REFS macro).
This commit is contained in:
parent
442ad74fc2
commit
3359cab038
6 changed files with 82 additions and 25 deletions
|
|
@ -36,6 +36,8 @@ EXPORT_FUNC(_PyTrash_deposit_object)
|
|||
EXPORT_FUNC(_PyTrash_destroy_chain)
|
||||
EXPORT_FUNC(_PyTrash_thread_deposit_object)
|
||||
EXPORT_FUNC(_PyTrash_thread_destroy_chain)
|
||||
EXPORT_FUNC(_Py_IncRef)
|
||||
EXPORT_FUNC(_Py_DecRef)
|
||||
EXPORT_FUNC(Py_AddPendingCall)
|
||||
EXPORT_FUNC(Py_AtExit)
|
||||
EXPORT_FUNC(Py_BuildValue)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue