Skip to content

Commit 8965abb

Browse files
committed
fix compilation
1 parent f9ae3cd commit 8965abb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/codecs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,11 +1027,11 @@ _PyCodec_BackslashReplaceUnicodeTranslateError(PyObject *exc)
10271027

10281028
PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
10291029
{
1030-
if (_PyIsUnicodeDecodeError(exc)) {
1031-
return _PyCodec_BackslashReplaceUnicodeDecodeError(exc);
1030+
if (_PyIsUnicodeEncodeError(exc)) {
1031+
return _PyCodec_BackslashReplaceUnicodeEncodeError(exc);
10321032
}
10331033
else if (_PyIsUnicodeDecodeError(exc)) {
1034-
return _PyCodec_BackslashReplaceUnicodeEncodeError(exc);
1034+
return _PyCodec_BackslashReplaceUnicodeDecodeError(exc);
10351035
}
10361036
else if (_PyIsUnicodeTranslateError(exc)) {
10371037
return _PyCodec_BackslashReplaceUnicodeTranslateError(exc);

0 commit comments

Comments
 (0)