summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-04-12 14:58:27 +0300
committerGitHub <noreply@github.com>2020-04-12 14:58:27 +0300
commit8f87eefe7f0576c05c488874eb9601a7a87c7312 (patch)
tree10ea36d1f702ae9e8bc34bcc88588868706948f6 /Objects/unicodeobject.c
parent3e0dd3730b5eff7e9ae6fb921aa77cd26efc9e3a (diff)
downloadcpython-git-8f87eefe7f0576c05c488874eb9601a7a87c7312.tar.gz
bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472)
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 3c79febea7..7f39022d1e 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3887,7 +3887,7 @@ PyUnicode_FSConverter(PyObject* arg, void* addr)
PyObject *path = NULL;
PyObject *output = NULL;
Py_ssize_t size;
- void *data;
+ const char *data;
if (arg == NULL) {
Py_DECREF(*(PyObject**)addr);
*(PyObject**)addr = NULL;
@@ -4718,7 +4718,7 @@ _PyUnicode_EncodeUTF7(PyObject *str,
unsigned int base64bits = 0;
unsigned long base64buffer = 0;
char * out;
- char * start;
+ const char * start;
if (PyUnicode_READY(str) == -1)
return NULL;
@@ -5446,7 +5446,7 @@ unicode_fill_utf8(PyObject *unicode)
return -1;
}
- char *start = writer.use_small_buffer ? writer.small_buffer :
+ const char *start = writer.use_small_buffer ? writer.small_buffer :
PyBytes_AS_STRING(writer.buffer);
Py_ssize_t len = end - start;