mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-35081: Move Py_BUILD_CORE code to internal/mem.h (GH-10249)
* Add #include "internal/mem.h" to C files using _PyMem_SetDefaultAllocator(). * Include/internal/mem.h now requires Py_BUILD_CORE to be defined.
This commit is contained in:
parent
b08746bfdf
commit
2be00d987d
10 changed files with 20 additions and 10 deletions
|
@ -198,16 +198,6 @@ PyAPI_FUNC(void) PyMem_SetAllocator(PyMemAllocatorDomain domain,
|
|||
PyAPI_FUNC(void) PyMem_SetupDebugHooks(void);
|
||||
#endif /* Py_LIMITED_API */
|
||||
|
||||
#ifdef Py_BUILD_CORE
|
||||
/* Set the memory allocator of the specified domain to the default.
|
||||
Save the old allocator into *old_alloc if it's non-NULL.
|
||||
Return on success, or return -1 if the domain is unknown. */
|
||||
PyAPI_FUNC(int) _PyMem_SetDefaultAllocator(
|
||||
PyMemAllocatorDomain domain,
|
||||
PyMemAllocatorEx *old_alloc);
|
||||
#endif
|
||||
|
||||
|
||||
/* bpo-35053: expose _Py_tracemalloc_config for performance:
|
||||
_Py_NewReference() needs an efficient check to test if tracemalloc is
|
||||
tracing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue