diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-12-06 17:26:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-06 17:26:10 +0100 |
commit | 6bf992a1ac6f3f4d0f83ead9c6403a76afdbe6eb (patch) | |
tree | 592a2085a4d49a5fc394e96b4e3b57d25d82b38a /Python/sysmodule.c | |
parent | 672b6baa71010f236ee8c8ce912e98cb542385c6 (diff) | |
download | cpython-git-6bf992a1ac6f3f4d0f83ead9c6403a76afdbe6eb.tar.gz |
bpo-32030: Add pymain_get_global_config() (#4735)
* Py_Main() now starts by reading Py_xxx configuration variables to
only work on its own private structure, and then later writes back
the configuration into these variables.
* Replace Py_GETENV() with pymain_get_env_var() which ignores empty
variables.
* Add _PyCoreConfig.dump_refs
* Add _PyCoreConfig.malloc_stats
* _PyObject_DebugMallocStats() is now responsible to check if debug
hooks are installed. The function returns 1 if stats were written,
or 0 if the hooks are disabled. Mark _PyMem_PymallocEnabled() as
static.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 64bc14e9c3..eeeaa7240e 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1368,8 +1368,7 @@ static PyObject * sys_debugmallocstats(PyObject *self, PyObject *args) { #ifdef WITH_PYMALLOC - if (_PyMem_PymallocEnabled()) { - _PyObject_DebugMallocStats(stderr); + if (_PyObject_DebugMallocStats(stderr)) { fputc('\n', stderr); } #endif |