summaryrefslogtreecommitdiff
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 10:16:47 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 10:16:47 +0200
commit85b0f5beb182cca8b1607accce2caab87ee29835 (patch)
tree0e55ae3180c2836152ceb4f9689fc7ed1ccb71c5 /Modules/_pickle.c
parenta98c4a984b34f887076f4171b1e3303e164cbddf (diff)
downloadcpython-git-85b0f5beb182cca8b1607accce2caab87ee29835.tar.gz
Added the const qualifier to char* variables that refer to readonly internal
UTF-8 represenatation of Unicode objects.
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 79113e0a93..d6d5cca10f 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -1941,7 +1941,7 @@ save_long(PicklerObject *self, PyObject *obj)
goto error;
}
else {
- char *string;
+ const char *string;
/* proto < 2: write the repr and newline. This is quadratic-time (in
the number of digits), in both directions. We add a trailing 'L'
@@ -2218,7 +2218,7 @@ write_unicode_binary(PicklerObject *self, PyObject *obj)
{
PyObject *encoded = NULL;
Py_ssize_t size;
- char *data;
+ const char *data;
int r;
if (PyUnicode_READY(obj))