Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize

with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
This commit is contained in:
Serhiy Storchaka 2016-11-20 09:13:07 +02:00
parent e20973926a
commit 06515833fe
31 changed files with 62 additions and 62 deletions

View file

@ -252,7 +252,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
char *string;
Py_ssize_t len;
string = _PyUnicode_AsStringAndSize(v, &len);
string = PyUnicode_AsUTF8AndSize(v, &len);
if (string == NULL || len != 1) {
PyErr_BadArgument();
return -1;