Skip to content

Commit

Permalink
[3.13] gh-125703: Correctly honour tracemalloc hooks on more PyDECREF…
Browse files Browse the repository at this point in the history
… specialized paths (GH-125712) (#125791)

(cherry picked from commit 3d1df3d)
  • Loading branch information
pablogsal authored Oct 28, 2024
1 parent 97c2e6a commit 00b13ec
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 @@ -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); \
} \
Expand Down

0 comments on commit 00b13ec

Please sign in to comment.