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/moduleobject.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/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index b6a2d6f..79be51a 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -483,7 +483,7 @@ PyModule_GetName(PyObject *m) if (name == NULL) return NULL; Py_DECREF(name); /* module dict has still a reference */ - return _PyUnicode_AsString(name); + return PyUnicode_AsUTF8(name); } PyObject* @@ -516,7 +516,7 @@ PyModule_GetFilename(PyObject *m) fileobj = PyModule_GetFilenameObject(m); if (fileobj == NULL) return NULL; - utf8 = _PyUnicode_AsString(fileobj); + utf8 = PyUnicode_AsUTF8(fileobj); Py_DECREF(fileobj); /* module dict has still a reference */ return utf8; } @@ -569,7 +569,7 @@ _PyModule_ClearDict(PyObject *d) if (PyUnicode_READ_CHAR(key, 0) == '_' && PyUnicode_READ_CHAR(key, 1) != '_') { if (Py_VerboseFlag > 1) { - const char *s = _PyUnicode_AsString(key); + const char *s = PyUnicode_AsUTF8(key); if (s != NULL) PySys_WriteStderr("# clear[1] %s\n", s); else @@ -589,7 +589,7 @@ _PyModule_ClearDict(PyObject *d) !_PyUnicode_EqualToASCIIString(key, "__builtins__")) { if (Py_VerboseFlag > 1) { - const char *s = _PyUnicode_AsString(key); + const char *s = PyUnicode_AsUTF8(key); if (s != NULL) PySys_WriteStderr("# clear[2] %s\n", s); else |