mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
This commit is contained in:
parent
e20973926a
commit
06515833fe
31 changed files with 62 additions and 62 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue