diff options
author | Sam Gross <colesbury@gmail.com> | 2024-01-06 03:12:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-06 03:12:26 (GMT) |
commit | d0f0308a373298a8906ee5a7546275e1b2e906ea (patch) | |
tree | 2220f010051413aadc70662c9f76add31260228b /Include/cpython | |
parent | 3375dfed400494ba5cc1b744d52f6fb8b7796059 (diff) | |
download | cpython-d0f0308a373298a8906ee5a7546275e1b2e906ea.zip cpython-d0f0308a373298a8906ee5a7546275e1b2e906ea.tar.gz cpython-d0f0308a373298a8906ee5a7546275e1b2e906ea.tar.bz2 |
gh-113750: Fix object resurrection in free-threaded builds (gh-113751)
gh-113750: Fix object resurrection on free-threaded builds
This avoids the undesired re-initializing of fields like `ob_gc_bits`,
`ob_mutex`, and `ob_tid` when an object is resurrected due to its
finalizer being called.
This change has no effect on the default (with GIL) build.
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/object.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h index d6482f4..c939316 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -4,6 +4,7 @@ PyAPI_FUNC(void) _Py_NewReference(PyObject *op); PyAPI_FUNC(void) _Py_NewReferenceNoTotal(PyObject *op); +PyAPI_FUNC(void) _Py_ResurrectReference(PyObject *op); #ifdef Py_REF_DEBUG /* These are useful as debugging aids when chasing down refleaks. */ |