summaryrefslogtreecommitdiff
path: root/Modules/parsermodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 09:13:40 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 09:13:40 +0200
commita98c4a984b34f887076f4171b1e3303e164cbddf (patch)
tree78f6f0fbbc6728e24d5478aadb7bfe1d871b244f /Modules/parsermodule.c
parentf6f15918087f2fae652634303a79f9cc6bc421ce (diff)
parent06515833fef7b8b5c7968edf72367d94ff7eb1e0 (diff)
downloadcpython-git-a98c4a984b34f887076f4171b1e3303e164cbddf.tar.gz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index 82770a52ff..b2566951d0 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);