mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
Don't use deprecated function PyUnicode_GET_SIZE()
Replace it with PyUnicode_GET_LENGTH() or PyUnicode_AsUnicodeAndSize()
This commit is contained in:
parent
e223439c13
commit
59799a8399
3 changed files with 7 additions and 8 deletions
|
|
@ -101,7 +101,7 @@ namespace_repr(PyObject *ns)
|
|||
goto error;
|
||||
|
||||
while ((key = PyIter_Next(keys_iter)) != NULL) {
|
||||
if (PyUnicode_Check(key) && PyUnicode_GET_SIZE(key) > 0) {
|
||||
if (PyUnicode_Check(key) && PyUnicode_GET_LENGTH(key) > 0) {
|
||||
PyObject *value, *item;
|
||||
|
||||
value = PyDict_GetItem(d, key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue