From 06515833fef7b8b5c7968edf72367d94ff7eb1e0 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 20 Nov 2016 09:13:07 +0200 Subject: Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize. --- Objects/object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Objects/object.c') diff --git a/Objects/object.c b/Objects/object.c index 5c639b2c9c..d88ae3b94f 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -890,7 +890,7 @@ PyObject_GetAttr(PyObject *v, PyObject *name) 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 @@ PyObject_SetAttr(PyObject *v, PyObject *name, PyObject *value) 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); -- cgit v1.2.1