summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-06 00:13:43 (GMT)
committerGitHub <noreply@github.com>2019-03-06 00:13:43 (GMT)
commitc656e25667c9acc0d13e5bb16d3df2938d0f614b (patch)
tree61e424b53e6f0b1f5a2d7637fedf47ab5e91962e /Include
parent7d2ef3ef5042356aaeaf832ad4204b7dad2e1b8c (diff)
downloadcpython-c656e25667c9acc0d13e5bb16d3df2938d0f614b.zip
cpython-c656e25667c9acc0d13e5bb16d3df2938d0f614b.tar.gz
cpython-c656e25667c9acc0d13e5bb16d3df2938d0f614b.tar.bz2
bpo-36142: Add _PyPreConfig_SetAllocator() (GH-12187)
* _PyPreConfig_Write() now reallocates the pre-configuration with the new memory allocator. * It is no longer needed to force the "default raw memory allocator" to clear pre-configuration and core configuration. Simplify the code. * _PyPreConfig_Write() now does nothing if called after Py_Initialize(): no longer check if the allocator is the same. * Remove _PyMem_GetDebugAllocatorsName(): dev mode sets again allocator to "debug".
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_coreconfig.h2
-rw-r--r--Include/internal/pycore_pymem.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/Include/internal/pycore_coreconfig.h b/Include/internal/pycore_coreconfig.h
index b34416b..0917a6a 100644
--- a/Include/internal/pycore_coreconfig.h
+++ b/Include/internal/pycore_coreconfig.h
@@ -59,7 +59,7 @@ PyAPI_FUNC(int) _PyPreConfig_AsDict(const _PyPreConfig *config,
PyObject *dict);
PyAPI_FUNC(_PyInitError) _PyPreConfig_ReadFromArgv(_PyPreConfig *config,
const _PyArgv *args);
-PyAPI_FUNC(_PyInitError) _PyPreConfig_Write(const _PyPreConfig *config);
+PyAPI_FUNC(_PyInitError) _PyPreConfig_Write(_PyPreConfig *config);
/* --- _PyCoreConfig ---------------------------------------------- */
diff --git a/Include/internal/pycore_pymem.h b/Include/internal/pycore_pymem.h
index fedc7cc..1e7da87 100644
--- a/Include/internal/pycore_pymem.h
+++ b/Include/internal/pycore_pymem.h
@@ -155,8 +155,6 @@ PyAPI_FUNC(int) _PyMem_SetDefaultAllocator(
PyMemAllocatorDomain domain,
PyMemAllocatorEx *old_alloc);
-PyAPI_FUNC(const char*) _PyMem_GetDebugAllocatorsName(void);
-
#ifdef __cplusplus
}
#endif