projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db88ae5
)
PyCodec_IgnoreErrors() avoids the deprecated "u#" format
author
Victor Stinner
<victor.stinner@haypocalc.com>
Thu, 1 Dec 2011 01:52:11 +0000
(
02:52
+0100)
committer
Victor Stinner
<victor.stinner@haypocalc.com>
Thu, 1 Dec 2011 01:52:11 +0000
(
02:52
+0100)
Python/codecs.c
patch
|
blob
|
history
diff --git
a/Python/codecs.c
b/Python/codecs.c
index cdf2c4455a3f63b979f92658e3ee4aed1ab0b503..9b0c4b2f446b9b761ad82487d909984dad75eb6a 100644
(file)
--- 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);
}