summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-01 02:52:11 +0100
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-01 02:52:11 +0100
commitba2c39f9d3821cb88b0ebab7bb40fa48405e78a5 (patch)
tree1ca2d0ab29e32249dab46f46bba1d488a9c4a8d0 /Python
parentf1afdf16024d4e245de68f132bede88a8dbceee3 (diff)
downloadcpython-ba2c39f9d3821cb88b0ebab7bb40fa48405e78a5.tar.gz
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 cdf2c4455a..9b0c4b2f44 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);
}