File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -3077,17 +3077,14 @@ _PyTrash_thread_destroy_chain(PyThreadState *tstate)
30773077 if (tagged_ptr & 1 ) {
30783078 _PyObject_GC_TRACK (op );
30793079 }
3080- /* It is possible that the object has been accessed through
3081- * a weak ref, so only free if refcount == 0) */
3082- if (Py_REFCNT (op ) == 0 ) {
3083- /* Call the deallocator directly. This used to try to
3084- * fool Py_DECREF into calling it indirectly, but
3085- * Py_DECREF was already called on this object, and in
3086- * assorted non-release builds calling Py_DECREF again ends
3087- * up distorting allocation statistics.
3088- */
3089- (* dealloc )(op );
3090- }
3080+ /* Call the deallocator directly. This used to try to
3081+ * fool Py_DECREF into calling it indirectly, but
3082+ * Py_DECREF was already called on this object, and in
3083+ * assorted non-release builds calling Py_DECREF again ends
3084+ * up distorting allocation statistics.
3085+ */
3086+ _PyObject_ASSERT (op , Py_REFCNT (op ) == 0 );
3087+ (* dealloc )(op );
30913088 }
30923089}
30933090
You can’t perform that action at this time.
0 commit comments