https://github.com/python/cpython/commit/3d1df3d84e5c75a52b6f1379cd7f2809fc50befa
commit: 3d1df3d84e5c75a52b6f1379cd7f2809fc50befa
branch: main
author: Pablo Galindo Salgado <[email protected]>
committer: pablogsal <[email protected]>
date: 2024-10-21T15:39:05+01:00
summary:

gh-125703: Correctly honour tracemalloc hooks on more PyDECREF specialized 
paths (#125712)

files:
M Python/ceval.c

diff --git a/Python/ceval.c b/Python/ceval.c
index 55e5eba25eaa21..ca75646b585f07 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -99,6 +99,11 @@
         } \
         _Py_DECREF_STAT_INC(); \
         if (--op->ob_refcnt == 0) { \
+            struct _reftracer_runtime_state *tracer = &_PyRuntime.ref_tracer; \
+            if (tracer->tracer_func != NULL) { \
+                void* data = tracer->tracer_data; \
+                tracer->tracer_func(op, PyRefTracer_DESTROY, data); \
+            } \
             destructor d = (destructor)(dealloc); \
             d(op); \
         } \

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to