diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 08:16:47 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 08:16:47 (GMT) |
commit | 85b0f5beb182cca8b1607accce2caab87ee29835 (patch) | |
tree | 0e55ae3180c2836152ceb4f9689fc7ed1ccb71c5 /Modules/_io | |
parent | a98c4a984b34f887076f4171b1e3303e164cbddf (diff) | |
download | cpython-85b0f5beb182cca8b1607accce2caab87ee29835.zip cpython-85b0f5beb182cca8b1607accce2caab87ee29835.tar.gz cpython-85b0f5beb182cca8b1607accce2caab87ee29835.tar.bz2 |
Added the const qualifier to char* variables that refer to readonly internal
UTF-8 represenatation of Unicode objects.
Diffstat (limited to 'Modules/_io')
-rw-r--r-- | Modules/_io/bufferedio.c | 2 | ||||
-rw-r--r-- | Modules/_io/stringio.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index c760522..2b43fd8 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -305,7 +305,7 @@ _enter_buffered_busy(buffered *self) "could not acquire lock for %A at interpreter " "shutdown, possibly due to daemon threads", (PyObject *) self); - char *msg = PyUnicode_AsUTF8(msgobj); + const char *msg = PyUnicode_AsUTF8(msgobj); Py_FatalError(msg); } return 1; diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c index 8542efd..93c8b47 100644 --- a/Modules/_io/stringio.c +++ b/Modules/_io/stringio.c @@ -693,7 +693,7 @@ _io_StringIO___init___impl(stringio *self, PyObject *value, PyObject *newline_obj) /*[clinic end generated code: output=a421ea023b22ef4e input=cee2d9181b2577a3]*/ { - char *newline = "\n"; + const char *newline = "\n"; Py_ssize_t value_len; /* Parse the newline argument. We only want to allow unicode objects or |