Skip to content

Commit

Permalink
[3.13] pythongh-125703: Correctly honour tracemalloc hooks on more Py…
Browse files Browse the repository at this point in the history
…DECREF specialized paths (pythonGH-125712)

(cherry picked from commit 3d1df3d)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
  • Loading branch information
pablogsal committed Oct 21, 2024
1 parent 65e43ca commit c373c86
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 c373c86

Please sign in to comment.