summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 08:16:47 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 08:16:47 (GMT)
commit85b0f5beb182cca8b1607accce2caab87ee29835 (patch)
tree0e55ae3180c2836152ceb4f9689fc7ed1ccb71c5 /Python/sysmodule.c
parenta98c4a984b34f887076f4171b1e3303e164cbddf (diff)
downloadcpython-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 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 28561ac..db5a48f 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -108,7 +108,7 @@ sys_displayhook_unencodable(PyObject *outf, PyObject *o)
{
PyObject *stdout_encoding = NULL;
PyObject *encoded, *escaped_str, *repr_str, *buffer, *result;
- char *stdout_encoding_str;
+ const char *stdout_encoding_str;
int ret;
stdout_encoding = _PyObject_GetAttrId(outf, &PyId_encoding);
@@ -2404,7 +2404,7 @@ sys_format(_Py_Identifier *key, FILE *fp, const char *format, va_list va)
{
PyObject *file, *message;
PyObject *error_type, *error_value, *error_traceback;
- char *utf8;
+ const char *utf8;
PyErr_Fetch(&error_type, &error_value, &error_traceback);
file = _PySys_GetObjectId(key);