Issue #28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()

is now of type "const char *" rather of "char *".
This commit is contained in:
Serhiy Storchaka 2017-01-22 23:07:07 +02:00
parent d528791096
commit 2a404b63d4
9 changed files with 26 additions and 13 deletions

View file

@ -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;

View file

@ -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;
}

View file

@ -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;