summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-22 23:07:07 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-22 23:07:07 +0200
commit72ded8136b92c1b107f629021cf231fd3163f041 (patch)
tree9f4f51ddbd4f92c8e85ce0bd519f3f0ff65f2dba /Modules
parent958f8e92cf0e79e54e1ee02b6a783eb7467e0c33 (diff)
downloadcpython-72ded8136b92c1b107f629021cf231fd3163f041.tar.gz
Issue #28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()
is now of type "const char *" rather of "char *".
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_dbmmodule.c2
-rw-r--r--Modules/_decimal/_decimal.c2
-rw-r--r--Modules/_gdbmmodule.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c
index 804978a6ac..52bdd0b4dd 100644
--- a/Modules/_dbmmodule.c
+++ b/Modules/_dbmmodule.c
@@ -239,7 +239,7 @@ dbm_contains(PyObject *self, PyObject *arg)
return -1;
}
if (PyUnicode_Check(arg)) {
- key.dptr = PyUnicode_AsUTF8AndSize(arg, &size);
+ key.dptr = (char *)PyUnicode_AsUTF8AndSize(arg, &size);
key.dsize = size;
if (key.dptr == NULL)
return -1;
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index fcc1f151cf..933b3f575a 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -3199,7 +3199,7 @@ dec_format(PyObject *dec, PyObject *args)
}
if (PyUnicode_Check(fmtarg)) {
- fmt = PyUnicode_AsUTF8AndSize(fmtarg, &size);
+ fmt = (char *)PyUnicode_AsUTF8AndSize(fmtarg, &size);
if (fmt == NULL) {
return NULL;
}
diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c
index daae71dc8d..b727ba6de2 100644
--- a/Modules/_gdbmmodule.c
+++ b/Modules/_gdbmmodule.c
@@ -319,7 +319,7 @@ dbm_contains(PyObject *self, PyObject *arg)
return -1;
}
if (PyUnicode_Check(arg)) {
- key.dptr = PyUnicode_AsUTF8AndSize(arg, &size);
+ key.dptr = (char *)PyUnicode_AsUTF8AndSize(arg, &size);
key.dsize = size;
if (key.dptr == NULL)
return -1;