diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-12-12 11:55:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-12 11:55:04 (GMT) |
commit | 4ae06c5337e01bdde28bce57b6b9166ad50947e3 (patch) | |
tree | 5e9e92f616bc452eb4096b56ea373fa8b46d2510 /Python/pylifecycle.c | |
parent | 5ce0a2a100909104836f53a2c8823006ec46f8ad (diff) | |
download | cpython-4ae06c5337e01bdde28bce57b6b9166ad50947e3.zip cpython-4ae06c5337e01bdde28bce57b6b9166ad50947e3.tar.gz cpython-4ae06c5337e01bdde28bce57b6b9166ad50947e3.tar.bz2 |
bpo-32241: Add the const qualifire to declarations of umodifiable strings. (#4748)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 0b3aa98..fdb09d9 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -414,7 +414,7 @@ static _LocaleCoercionTarget _TARGET_LOCALES[] = { {NULL} }; -static char * +static const char * get_default_standard_stream_error_handler(void) { const char *ctype_loc = setlocale(LC_CTYPE, NULL); @@ -440,7 +440,7 @@ get_default_standard_stream_error_handler(void) } #ifdef PY_COERCE_C_LOCALE -static const char *_C_LOCALE_COERCION_WARNING = +static const char _C_LOCALE_COERCION_WARNING[] = "Python detected LC_CTYPE=C: LC_CTYPE coerced to %.20s (set another locale " "or PYTHONCOERCECLOCALE=0 to disable this locale coercion behavior).\n"; @@ -1757,7 +1757,8 @@ init_sys_streams(void) PyObject *std = NULL; int fd; PyObject * encoding_attr; - char *pythonioencoding = NULL, *encoding, *errors; + char *pythonioencoding = NULL; + const char *encoding, *errors; _PyInitError res = _Py_INIT_OK(); /* Hack to avoid a nasty recursion issue when Python is invoked |