aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_tracemalloc.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-02 02:49:18 +0200
committerGitHub <noreply@github.com>2023-07-02 00:49:18 +0000
commitfeb51f3a6443d7c0148e2e7be2ed58b4c69fa265 (patch)
tree370ec2982ab329ad0159fe6b4ffdaea541984468 /Lib/test/test_tracemalloc.py
parent18b1fdebe0cd5e601aa341227c13ec9d89bdf32c (diff)
downloadcpython-feb51f3a6443d7c0148e2e7be2ed58b4c69fa265.tar.gz
cpython-feb51f3a6443d7c0148e2e7be2ed58b4c69fa265.zip
gh-106320: Remove private _PyTraceMalloc C API functions (#106324)
* Remove private _PyTraceMalloc C API functions: move them to the internal C API. * Don't export most of these functions anymore, but still export _PyTraceMalloc_GetTraceback() used by tests. * Rename Include/tracemalloc.h to Include/cpython/tracemalloc.h
Diffstat (limited to 'Lib/test/test_tracemalloc.py')
-rw-r--r--Lib/test/test_tracemalloc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_tracemalloc.py b/Lib/test/test_tracemalloc.py
index 94bcee302fe..4af4ca3b977 100644
--- a/Lib/test/test_tracemalloc.py
+++ b/Lib/test/test_tracemalloc.py
@@ -11,8 +11,10 @@ from test.support import os_helper
try:
import _testcapi
+ import _testinternalcapi
except ImportError:
_testcapi = None
+ _testinternalcapi = None
EMPTY_STRING_SIZE = sys.getsizeof(b'')
@@ -1008,7 +1010,7 @@ class TestCAPI(unittest.TestCase):
tracemalloc.stop()
def get_traceback(self):
- frames = _testcapi.tracemalloc_get_traceback(self.domain, self.ptr)
+ frames = _testinternalcapi._PyTraceMalloc_GetTraceback(self.domain, self.ptr)
if frames is not None:
return tracemalloc.Traceback(frames)
else: