summaryrefslogtreecommitdiffstats
path: root/Objects/odictobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-11 11:06:26 (GMT)
committerGitHub <noreply@github.com>2017-11-11 11:06:26 (GMT)
commite2f92de6a90ae11a6d8e01bd17fd88b005516835 (patch)
treea5bc255a98f488e5ecf195dc3f55665e9afecc47 /Objects/odictobject.c
parente184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 (diff)
downloadcpython-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/odictobject.c')
-rw-r--r--Objects/odictobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/odictobject.c b/Objects/odictobject.c
index afacb36..5d22ce7 100644
--- a/Objects/odictobject.c
+++ b/Objects/odictobject.c
@@ -1625,7 +1625,7 @@ odict_init(PyObject *self, PyObject *args, PyObject *kwds)
if (len == -1)
return -1;
if (len > 1) {
- char *msg = "expected at most 1 arguments, got %d";
+ const char *msg = "expected at most 1 arguments, got %d";
PyErr_Format(PyExc_TypeError, msg, len);
return -1;
}
@@ -2337,7 +2337,7 @@ mutablemapping_update(PyObject *self, PyObject *args, PyObject *kwargs)
assert(args == NULL || PyTuple_Check(args));
len = (args != NULL) ? PyTuple_GET_SIZE(args) : 0;
if (len > 1) {
- char *msg = "update() takes at most 1 positional argument (%d given)";
+ const char *msg = "update() takes at most 1 positional argument (%d given)";
PyErr_Format(PyExc_TypeError, msg, len);
return NULL;
}