Don't use deprecated function PyUnicode_GET_SIZE()

Replace it with PyUnicode_GET_LENGTH() or PyUnicode_AsUnicodeAndSize()
This commit is contained in:
Victor Stinner 2013-11-13 14:17:30 +01:00
parent e223439c13
commit 59799a8399
3 changed files with 7 additions and 8 deletions

View file

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