summaryrefslogtreecommitdiff
path: root/Modules/main.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-25 19:53:18 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-25 19:53:18 +0200
commitd1ba93f9a6a441ac31c5fd1890ce730b9e6d330d (patch)
tree8b977eca9b539fb4d1064d92cc2a405fab36e75d /Modules/main.c
parent5f0e32baa674d4563910e0b58f1563ab0b2aa52a (diff)
downloadcpython-d1ba93f9a6a441ac31c5fd1890ce730b9e6d330d.tar.gz
Issue #25923: Added the const qualifier to static constant arrays.
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 0fbdb698e3..4358cc8000 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -42,11 +42,11 @@ static int orig_argc;
#define PROGRAM_OPTS BASE_OPTS
/* Short usage message (with %s for argv0) */
-static char *usage_line =
+static const char usage_line[] =
"usage: %ls [option] ... [-c cmd | -m mod | file | -] [arg] ...\n";
/* Long usage message, split into parts < 512 bytes */
-static char *usage_1 = "\
+static const char usage_1[] = "\
Options and arguments (and corresponding environment variables):\n\
-b : issue warnings about str(bytes_instance), str(bytearray_instance)\n\
and comparing bytes/bytearray with str. (-bb: issue errors)\n\
@@ -56,7 +56,7 @@ Options and arguments (and corresponding environment variables):\n\
-E : ignore PYTHON* environment variables (such as PYTHONPATH)\n\
-h : print this help message and exit (also --help)\n\
";
-static char *usage_2 = "\
+static const char usage_2[] = "\
-i : inspect interactively after running script; forces a prompt even\n\
if stdin does not appear to be a terminal; also PYTHONINSPECT=x\n\
-I : isolate Python from the user's environment (implies -E and -s)\n\
@@ -67,7 +67,7 @@ static char *usage_2 = "\
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
-S : don't imply 'import site' on initialization\n\
";
-static char *usage_3 = "\
+static const char usage_3[] = "\
-u : unbuffered binary stdout and stderr, stdin always buffered;\n\
also PYTHONUNBUFFERED=x\n\
see man page for details on internal buffering relating to '-u'\n\
@@ -79,7 +79,7 @@ static char *usage_3 = "\
-x : skip first line of source, allowing use of non-Unix forms of #!cmd\n\
-X opt : set implementation-specific option\n\
";
-static char *usage_4 = "\
+static const char usage_4[] = "\
file : program read from script file\n\
- : program read from stdin (default; interactive mode if a tty)\n\
arg ...: arguments passed to program in sys.argv[1:]\n\n\
@@ -88,14 +88,14 @@ PYTHONSTARTUP: file executed on interactive startup (no default)\n\
PYTHONPATH : '%c'-separated list of directories prefixed to the\n\
default module search path. The result is sys.path.\n\
";
-static char *usage_5 =
+static const char usage_5[] =
"PYTHONHOME : alternate <prefix> directory (or <prefix>%c<exec_prefix>).\n"
" The default module search path uses %s.\n"
"PYTHONCASEOK : ignore case in 'import' statements (Windows).\n"
"PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n"
"PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.\n\
";
-static char *usage_6 = "\
+static const char usage_6[] = "\
PYTHONHASHSEED: if this variable is set to 'random', a random value is used\n\
to seed the hashes of str, bytes and datetime objects. It can also be\n\
set to an integer in the range [0,4294967295] to get hash values with a\n\