mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
Add the const qualifier to "char *" variables that refer to literal strings. (#4370)
This commit is contained in:
parent
e184cfd7bf
commit
e2f92de6a9
23 changed files with 46 additions and 41 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue