summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-01-10 18:18:38 (GMT)
committerGitHub <noreply@github.com>2024-01-10 18:18:38 (GMT)
commit73ae2023a76f199ff854f8da14bd9ff8e93ee7fd (patch)
tree15945814e01279d22bcff6c49b149a4fb7872c3f /Include
parent901a971e161e060bd95f3cf3aeebe8b48d6e6dac (diff)
downloadcpython-73ae2023a76f199ff854f8da14bd9ff8e93ee7fd.zip
cpython-73ae2023a76f199ff854f8da14bd9ff8e93ee7fd.tar.gz
cpython-73ae2023a76f199ff854f8da14bd9ff8e93ee7fd.tar.bz2
gh-113753: Clear finalized bit when putting PyAsyncGenASend back into free list (#113754)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_gc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/internal/pycore_gc.h b/Include/internal/pycore_gc.h
index 2a0730e..753763a 100644
--- a/Include/internal/pycore_gc.h
+++ b/Include/internal/pycore_gc.h
@@ -122,6 +122,10 @@ static inline void _PyGC_SET_FINALIZED(PyObject *op) {
PyGC_Head *gc = _Py_AS_GC(op);
_PyGCHead_SET_FINALIZED(gc);
}
+static inline void _PyGC_CLEAR_FINALIZED(PyObject *op) {
+ PyGC_Head *gc = _Py_AS_GC(op);
+ gc->_gc_prev &= ~_PyGC_PREV_MASK_FINALIZED;
+}
/* GC runtime state */