mirror of
https://github.com/python/cpython.git
synced 2025-09-02 06:57:58 +00:00
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.
This commit is contained in:
parent
672b6baa71
commit
6bf992a1ac
7 changed files with 141 additions and 76 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue