Skip to content

Commit

Permalink
pythongh-125703: Correctly honour tracemalloc hooks on more PyDECREF …
Browse files Browse the repository at this point in the history
…specialized paths
  • Loading branch information
pablogsal committed Oct 21, 2024
1 parent b3c6b2c commit 4c1937d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
} \
Expand Down

0 comments on commit 4c1937d

Please sign in to comment.