summaryrefslogtreecommitdiffstats
path: root/Python/pathconfig.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-06 23:54:20 (GMT)
committerGitHub <noreply@github.com>2020-03-06 23:54:20 (GMT)
commit9e5d30cc99e34f4c3e7b2cd851de20816c9d1927 (patch)
tree71e726c4695b9b3b0a31d7d2516ce8ee83b52721 /Python/pathconfig.c
parent7b3c252dc7f44d4bdc4c7c82d225ebd09c78f520 (diff)
downloadcpython-9e5d30cc99e34f4c3e7b2cd851de20816c9d1927.zip
cpython-9e5d30cc99e34f4c3e7b2cd851de20816c9d1927.tar.gz
cpython-9e5d30cc99e34f4c3e7b2cd851de20816c9d1927.tar.bz2
bpo-39882: Py_FatalError() logs the function name (GH-18819)
The Py_FatalError() function is replaced with a macro which logs automatically the name of the current function, unless the Py_LIMITED_API macro is defined. Changes: * Add _Py_FatalErrorFunc() function. * Remove the function name from the message of Py_FatalError() calls which included the function name. * Update tests.
Diffstat (limited to 'Python/pathconfig.c')
-rw-r--r--Python/pathconfig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index e37b561..3756e3a 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -515,7 +515,7 @@ Py_SetPath(const wchar_t *path)
|| _Py_path_config.exec_prefix == NULL
|| _Py_path_config.module_search_path == NULL)
{
- Py_FatalError("Py_SetPath() failed: out of memory");
+ Py_FatalError("out of memory");
}
}
@@ -536,7 +536,7 @@ Py_SetPythonHome(const wchar_t *home)
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc);
if (_Py_path_config.home == NULL) {
- Py_FatalError("Py_SetPythonHome() failed: out of memory");
+ Py_FatalError("out of memory");
}
}
@@ -557,7 +557,7 @@ Py_SetProgramName(const wchar_t *program_name)
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc);
if (_Py_path_config.program_name == NULL) {
- Py_FatalError("Py_SetProgramName() failed: out of memory");
+ Py_FatalError("out of memory");
}
}
@@ -577,7 +577,7 @@ _Py_SetProgramFullPath(const wchar_t *program_full_path)
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc);
if (_Py_path_config.program_full_path == NULL) {
- Py_FatalError("_Py_SetProgramFullPath() failed: out of memory");
+ Py_FatalError("out of memory");
}
}