summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c2
-rw-r--r--Objects/obmalloc.c6
2 files changed, 1 insertions, 7 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 01eede94d5..a499cb32b2 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2001,7 +2001,7 @@ _PyTypes_FiniTypes(PyInterpreterState *interp)
void
_Py_NewReference(PyObject *op)
{
- if (_Py_tracemalloc_config.tracing) {
+ if (_PyRuntime.tracemalloc.config.tracing) {
_PyTraceMalloc_NewReference(op);
}
#ifdef Py_REF_DEBUG
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index 481cbde9fd..4c08bc214c 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -201,12 +201,6 @@ _PyMem_ArenaFree(void *Py_UNUSED(ctx), void *ptr,
#endif
-/* bpo-35053: Declare tracemalloc configuration here rather than
- Modules/_tracemalloc.c because _tracemalloc can be compiled as dynamic
- library, whereas _Py_NewReference() requires it. */
-struct _PyTraceMalloc_Config _Py_tracemalloc_config = _PyTraceMalloc_Config_INIT;
-
-
#define _PyMem_Raw (_PyRuntime.allocators.standard.raw)
#define _PyMem (_PyRuntime.allocators.standard.mem)
#define _PyObject (_PyRuntime.allocators.standard.obj)