mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-113753: Clear finalized bit when putting PyAsyncGenASend back into free list (#113754)
This commit is contained in:
parent
901a971e16
commit
73ae2023a7
4 changed files with 16 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "pycore_call.h" // _PyObject_CallNoArgs()
|
||||
#include "pycore_ceval.h" // _PyEval_EvalFrame()
|
||||
#include "pycore_frame.h" // _PyInterpreterFrame
|
||||
#include "pycore_gc.h" // _PyGC_CLEAR_FINALIZED()
|
||||
#include "pycore_genobject.h" // struct _Py_async_gen_state
|
||||
#include "pycore_modsupport.h" // _PyArg_CheckPositional()
|
||||
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
|
||||
|
@ -1739,6 +1740,7 @@ async_gen_asend_dealloc(PyAsyncGenASend *o)
|
|||
#endif
|
||||
if (state->asend_numfree < _PyAsyncGen_MAXFREELIST) {
|
||||
assert(PyAsyncGenASend_CheckExact(o));
|
||||
_PyGC_CLEAR_FINALIZED((PyObject *)o);
|
||||
state->asend_freelist[state->asend_numfree++] = o;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue