cpython: PyCodec_IgnoreErrors() avoids the deprecated "u#" format

Dec. 1, 2011
1:52 a.m.
http://hg.python.org/cpython/rev/6407294eb3c6 changeset: 73800:6407294eb3c6 user: Victor Stinner <victor.stinner@haypocalc.com> date: Thu Dec 01 02:52:11 2011 +0100 summary: PyCodec_IgnoreErrors() avoids the deprecated "u#" format files: Python/codecs.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/Python/codecs.c b/Python/codecs.c --- a/Python/codecs.c +++ b/Python/codecs.c @@ -510,8 +510,7 @@ wrong_exception_type(exc); return NULL; } - /* ouch: passing NULL, 0, pos gives None instead of u'' */ - return Py_BuildValue("(u#n)", &end, 0, end); + return Py_BuildValue("(Nn)", PyUnicode_New(0, 0), end); } -- Repository URL: http://hg.python.org/cpython
4894
Age (days ago)
4894
Last active (days ago)
0 comments
1 participants
participants (1)
-
victor.stinner