Skip to content

Commit ee45009

Browse files
author
Victor Stinner
committed
PyCodec_IgnoreErrors() avoids the deprecated "u#" format
1 parent db88ae5 commit ee45009

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Python/codecs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,7 @@ PyObject *PyCodec_IgnoreErrors(PyObject *exc)
510510
wrong_exception_type(exc);
511511
return NULL;
512512
}
513-
/* ouch: passing NULL, 0, pos gives None instead of u'' */
514-
return Py_BuildValue("(u#n)", &end, 0, end);
513+
return Py_BuildValue("(Nn)", PyUnicode_New(0, 0), end);
515514
}
516515

517516

0 commit comments

Comments
 (0)