bpo-35053: Define _PyTraceMalloc_NewReference in object.h (GH-10107)
_PyTraceMalloc_NewReference() is now called by _Py_NewReference(), so
move its definition to object.h. Moreover, define it even if
Py_LIMITED_API is defined, since _Py_NewReference() is also exposed
even if Py_LIMITED_API is defined.
diff --git a/Modules/Setup b/Modules/Setup
index a0622cc..fb16698 100644
--- a/Modules/Setup
+++ b/Modules/Setup
@@ -129,6 +129,9 @@
faulthandler faulthandler.c
# debug tool to trace memory blocks allocated by Python
+#
+# bpo-35053: The module must be builtin since _Py_NewReference()
+# can call _PyTraceMalloc_NewReference().
_tracemalloc _tracemalloc.c hashtable.c
# The rest of the modules listed in this file are all commented out by