summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 07:13:40 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 07:13:40 (GMT)
commita98c4a984b34f887076f4171b1e3303e164cbddf (patch)
tree78f6f0fbbc6728e24d5478aadb7bfe1d871b244f /Python/ceval.c
parentf6f15918087f2fae652634303a79f9cc6bc421ce (diff)
parent06515833fef7b8b5c7968edf72367d94ff7eb1e0 (diff)
downloadcpython-a98c4a984b34f887076f4171b1e3303e164cbddf.zip
cpython-a98c4a984b34f887076f4171b1e3303e164cbddf.tar.gz
cpython-a98c4a984b34f887076f4171b1e3303e164cbddf.tar.bz2
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index eefe66f..bbbf005 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -4723,7 +4723,7 @@ PyEval_GetFuncName(PyObject *func)
if (PyMethod_Check(func))
return PyEval_GetFuncName(PyMethod_GET_FUNCTION(func));
else if (PyFunction_Check(func))
- return _PyUnicode_AsString(((PyFunctionObject*)func)->func_name);
+ return PyUnicode_AsUTF8(((PyFunctionObject*)func)->func_name);
else if (PyCFunction_Check(func))
return ((PyCFunctionObject*)func)->m_ml->ml_name;
else
@@ -5297,7 +5297,7 @@ format_exc_check_arg(PyObject *exc, const char *format_str, PyObject *obj)
if (!obj)
return;
- obj_str = _PyUnicode_AsString(obj);
+ obj_str = PyUnicode_AsUTF8(obj);
if (!obj_str)
return;