mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
gh-106320: Remove private _PyMem API (#107187)
Move private _PyMem functions to the internal C API (pycore_pymem.h): * _PyMem_GetCurrentAllocatorName() * _PyMem_RawStrdup() * _PyMem_RawWcsdup() * _PyMem_Strdup() No longer export these functions. Move pymem_getallocatorsname() function from _testcapi to _testinternalcapi, since the API moved to the internal C API.
This commit is contained in:
parent
d27eb1e406
commit
307186704d
8 changed files with 38 additions and 35 deletions
|
@ -717,11 +717,11 @@ class CmdLineTest(unittest.TestCase):
|
|||
|
||||
# Memory allocator debug hooks
|
||||
try:
|
||||
import _testcapi
|
||||
import _testinternalcapi
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
code = "import _testcapi; print(_testcapi.pymem_getallocatorsname())"
|
||||
code = "import _testinternalcapi; print(_testinternalcapi.pymem_getallocatorsname())"
|
||||
with support.SuppressCrashReport():
|
||||
out = self.run_xdev("-c", code, check_exitcode=False)
|
||||
if support.with_pymalloc():
|
||||
|
@ -783,7 +783,7 @@ class CmdLineTest(unittest.TestCase):
|
|||
self.assertEqual(out, expected_filters)
|
||||
|
||||
def check_pythonmalloc(self, env_var, name):
|
||||
code = 'import _testcapi; print(_testcapi.pymem_getallocatorsname())'
|
||||
code = 'import _testinternalcapi; print(_testinternalcapi.pymem_getallocatorsname())'
|
||||
env = dict(os.environ)
|
||||
env.pop('PYTHONDEVMODE', None)
|
||||
if env_var is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue