https://github.com/python/cpython/commit/00b13ec050696f98da28db15987122d1f3bd5d39
commit: 00b13ec050696f98da28db15987122d1f3bd5d39
branch: 3.13
author: Pablo Galindo Salgado <[email protected]>
committer: pablogsal <[email protected]>
date: 2024-10-28T11:50:36Z
summary:
[3.13] gh-125703: Correctly honour tracemalloc hooks on more PyDECREF
specialized paths (GH-125712) (#125791)
(cherry picked from commit 3d1df3d84e5c75a52b6f1379cd7f2809fc50befa)
files:
M Python/ceval.c
diff --git a/Python/ceval.c b/Python/ceval.c
index 3c7ca9512c7a97..d970ffa0309a8d 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -95,6 +95,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]