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 /Modules/parsermodule.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 'Modules/parsermodule.c')
-rw-r--r-- | Modules/parsermodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index 82770a5..b2566951 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -912,7 +912,7 @@ build_node_children(PyObject *tuple, node *root, int *line_num) Py_DECREF(o); } } - temp_str = _PyUnicode_AsStringAndSize(temp, &len); + temp_str = PyUnicode_AsUTF8AndSize(temp, &len); if (temp_str == NULL) { Py_DECREF(temp); Py_XDECREF(elem); @@ -1013,7 +1013,7 @@ build_node_tree(PyObject *tuple) if (res && encoding) { Py_ssize_t len; const char *temp; - temp = _PyUnicode_AsStringAndSize(encoding, &len); + temp = PyUnicode_AsUTF8AndSize(encoding, &len); if (temp == NULL) { Py_DECREF(res); Py_DECREF(encoding); |