mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
bpo-44895: Introduce PYTHONDUMPREFSFILE variable for refcount dumping (GH-27767)
This commit is contained in:
parent
96346cb6d0
commit
c2c857b40f
5 changed files with 41 additions and 0 deletions
|
@ -898,6 +898,7 @@ _PyConfig_Copy(PyConfig *config, const PyConfig *config2)
|
|||
COPY_ATTR(no_debug_ranges);
|
||||
COPY_ATTR(show_ref_count);
|
||||
COPY_ATTR(dump_refs);
|
||||
COPY_ATTR(dump_refs_file);
|
||||
COPY_ATTR(malloc_stats);
|
||||
|
||||
COPY_WSTR_ATTR(pycache_prefix);
|
||||
|
@ -1701,6 +1702,14 @@ config_read_env_vars(PyConfig *config)
|
|||
config->malloc_stats = 1;
|
||||
}
|
||||
|
||||
if (config->dump_refs_file == NULL) {
|
||||
status = CONFIG_GET_ENV_DUP(config, &config->dump_refs_file,
|
||||
L"PYTHONDUMPREFSFILE", "PYTHONDUMPREFSFILE");
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
if (config->pythonpath_env == NULL) {
|
||||
status = CONFIG_GET_ENV_DUP(config, &config->pythonpath_env,
|
||||
L"PYTHONPATH", "PYTHONPATH");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue