diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-11 11:06:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-11 11:06:26 (GMT) |
commit | e2f92de6a90ae11a6d8e01bd17fd88b005516835 (patch) | |
tree | a5bc255a98f488e5ecf195dc3f55665e9afecc47 /Objects/unicodeobject.c | |
parent | e184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 (diff) | |
download | cpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.zip cpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.tar.gz cpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.tar.bz2 |
Add the const qualifier to "char *" variables that refer to literal strings. (#4370)
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 194c5bc..fdc3197 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -8396,8 +8396,8 @@ charmap_encoding_error( Py_ssize_t collstartpos = *inpos; Py_ssize_t collendpos = *inpos+1; Py_ssize_t collpos; - char *encoding = "charmap"; - char *reason = "character maps to <undefined>"; + const char *encoding = "charmap"; + const char *reason = "character maps to <undefined>"; charmapencode_result x; Py_UCS4 ch; int val; @@ -8928,7 +8928,7 @@ _PyUnicode_TranslateCharmap(PyObject *input, /* output buffer */ _PyUnicodeWriter writer; /* error handler */ - char *reason = "character maps to <undefined>"; + const char *reason = "character maps to <undefined>"; PyObject *errorHandler = NULL; PyObject *exc = NULL; int ignore; |