mirror of
https://github.com/python/cpython.git
synced 2025-09-18 14:40:43 +00:00
Issue #25923: Added the const qualifier to static constant arrays.
This commit is contained in:
parent
ea8c43152f
commit
2d06e84455
44 changed files with 139 additions and 134 deletions
|
@ -320,7 +320,7 @@ PyImport_GetModuleDict(void)
|
|||
|
||||
|
||||
/* List of names to clear in sys */
|
||||
static char* sys_deletes[] = {
|
||||
static const char * const sys_deletes[] = {
|
||||
"path", "argv", "ps1", "ps2",
|
||||
"last_type", "last_value", "last_traceback",
|
||||
"path_hooks", "path_importer_cache", "meta_path",
|
||||
|
@ -330,7 +330,7 @@ static char* sys_deletes[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static char* sys_files[] = {
|
||||
static const char * const sys_files[] = {
|
||||
"stdin", "__stdin__",
|
||||
"stdout", "__stdout__",
|
||||
"stderr", "__stderr__",
|
||||
|
@ -347,7 +347,7 @@ PyImport_Cleanup(void)
|
|||
PyInterpreterState *interp = PyThreadState_GET()->interp;
|
||||
PyObject *modules = interp->modules;
|
||||
PyObject *weaklist = NULL;
|
||||
char **p;
|
||||
const char * const *p;
|
||||
|
||||
if (modules == NULL)
|
||||
return; /* Already done */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue