Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
diff --git a/Objects/object.c b/Objects/object.c
index 5c639b2..d88ae3b 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -890,7 +890,7 @@
if (tp->tp_getattro != NULL)
return (*tp->tp_getattro)(v, name);
if (tp->tp_getattr != NULL) {
- char *name_str = _PyUnicode_AsString(name);
+ char *name_str = PyUnicode_AsUTF8(name);
if (name_str == NULL)
return NULL;
return (*tp->tp_getattr)(v, name_str);
@@ -934,7 +934,7 @@
return err;
}
if (tp->tp_setattr != NULL) {
- char *name_str = _PyUnicode_AsString(name);
+ char *name_str = PyUnicode_AsUTF8(name);
if (name_str == NULL)
return -1;
err = (*tp->tp_setattr)(v, name_str, value);