summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-01 01:52:11 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-01 01:52:11 (GMT)
commitee450093a9cebf99f186f69a14c7c36ff23b5b00 (patch)
treed4dbce020784fcc1a86391cd6f2001b20dac0ecf /Python
parentdb88ae5d666723d90c9b681fe874aa0a8fb4b04a (diff)
downloadcpython-ee450093a9cebf99f186f69a14c7c36ff23b5b00.zip
cpython-ee450093a9cebf99f186f69a14c7c36ff23b5b00.tar.gz
cpython-ee450093a9cebf99f186f69a14c7c36ff23b5b00.tar.bz2
PyCodec_IgnoreErrors() avoids the deprecated "u#" format
Diffstat (limited to 'Python')
-rw-r--r--Python/codecs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index cdf2c44..9b0c4b2 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -510,8 +510,7 @@ PyObject *PyCodec_IgnoreErrors(PyObject *exc)
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);
}