bpo-32241: Add the const qualifire to declarations of umodifiable strings. (#4748)

This commit is contained in:
Serhiy Storchaka 2017-12-12 13:55:04 +02:00 committed by GitHub
parent 5ce0a2a100
commit 4ae06c5337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 59 additions and 56 deletions

View file

@ -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