diff options
author | Victor Stinner <vstinner@python.org> | 2023-07-02 02:49:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 00:49:18 +0000 |
commit | feb51f3a6443d7c0148e2e7be2ed58b4c69fa265 (patch) | |
tree | 370ec2982ab329ad0159fe6b4ffdaea541984468 /Lib/test/test_tracemalloc.py | |
parent | 18b1fdebe0cd5e601aa341227c13ec9d89bdf32c (diff) | |
download | cpython-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.py | 4 |
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: |