bpo-36465: Make release and debug ABI compatible (GH-12615)

Release build and debug build are now ABI compatible: the Py_DEBUG
define no longer implies Py_TRACE_REFS define which introduces the
only ABI incompatibility.

A new "./configure --with-trace-refs" build option is now required to
get Py_TRACE_REFS define which adds sys.getobjects() function and
PYTHONDUMPREFS environment variable.

Changes:

* Add ./configure --with-trace-refs
* Py_DEBUG no longer implies Py_TRACE_REFS
This commit is contained in:
Victor Stinner 2019-04-25 00:56:28 +02:00 committed by GitHub
parent 888f37bc28
commit f4e4703e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 14 deletions

View file

@ -1653,7 +1653,7 @@ def python_is_optimized():
_header = 'nP'
_align = '0n'
if hasattr(sys, "gettotalrefcount"):
if hasattr(sys, "getobjects"):
_header = '2P' + _header
_align = '0P'
_vheader = _header + 'n'