Commit ee450093 authored by Victor Stinner's avatar Victor Stinner

PyCodec_IgnoreErrors() avoids the deprecated "u#" format

parent db88ae5d
...@@ -510,8 +510,7 @@ PyObject *PyCodec_IgnoreErrors(PyObject *exc) ...@@ -510,8 +510,7 @@ PyObject *PyCodec_IgnoreErrors(PyObject *exc)
wrong_exception_type(exc); wrong_exception_type(exc);
return NULL; return NULL;
} }
/* ouch: passing NULL, 0, pos gives None instead of u'' */ return Py_BuildValue("(Nn)", PyUnicode_New(0, 0), end);
return Py_BuildValue("(u#n)", &end, 0, end);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment