diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 07:13:07 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 07:13:07 (GMT) |
commit | 06515833fef7b8b5c7968edf72367d94ff7eb1e0 (patch) | |
tree | 58a7c06bba8141883a5e5c8621d2b0683ae9fe2e /Objects/typeobject.c | |
parent | e20973926a2ec19c4b87e460dc6f0edb478ce352 (diff) | |
download | cpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.zip cpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.tar.gz cpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.tar.bz2 |
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r-- | Objects/typeobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index dc9a80a..606e08e 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -1626,7 +1626,7 @@ consistent method resolution\norder (MRO) for bases"); PyObject *name = class_name(k); char *name_str; if (name != NULL) { - name_str = _PyUnicode_AsString(name); + name_str = PyUnicode_AsUTF8(name); if (name_str == NULL) name_str = "?"; } else @@ -2575,7 +2575,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) char *doc_str; char *tp_doc; - doc_str = _PyUnicode_AsString(doc); + doc_str = PyUnicode_AsUTF8(doc); if (doc_str == NULL) goto error; /* Silently truncate the docstring if it contains null bytes. */ @@ -2623,7 +2623,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) slotoffset = base->tp_basicsize; if (et->ht_slots != NULL) { for (i = 0; i < nslots; i++, mp++) { - mp->name = _PyUnicode_AsString( + mp->name = PyUnicode_AsUTF8( PyTuple_GET_ITEM(et->ht_slots, i)); if (mp->name == NULL) goto error; |