We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0069be1 commit 1a15abaCopy full SHA for 1a15aba
Python/codecs.c
@@ -534,10 +534,11 @@ PyObject *PyCodec_ReplaceErrors(PyObject *exc)
534
return Py_BuildValue("(Nn)", res, end);
535
}
536
else if (PyObject_IsInstance(exc, PyExc_UnicodeDecodeError)) {
537
- Py_UNICODE res = Py_UNICODE_REPLACEMENT_CHARACTER;
538
if (PyUnicodeDecodeError_GetEnd(exc, &end))
539
return NULL;
540
- return Py_BuildValue("(u#n)", &res, 1, end);
+ return Py_BuildValue("(Cn)",
+ (int)Py_UNICODE_REPLACEMENT_CHARACTER,
541
+ end);
542
543
else if (PyObject_IsInstance(exc, PyExc_UnicodeTranslateError)) {
544
PyObject *res;
0 commit comments