Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.6
Changeset: r69692:0441dc0230a3
Date: 2014-03-04 22:11 +0000
http://bitbucket.org/pypy/pypy/changeset/0441dc0230a3/
Log: fix charmap decode running on narrow python
diff --git a/pypy/module/_codecs/interp_codecs.py
b/pypy/module/_codecs/interp_codecs.py
--- a/pypy/module/_codecs/interp_codecs.py
+++ b/pypy/module/_codecs/interp_codecs.py
@@ -1,6 +1,7 @@
from rpython.rlib import jit
from rpython.rlib.objectmodel import we_are_translated
from rpython.rlib.rstring import UnicodeBuilder
+from rpython.rlib.runicode import UNICHR
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
@@ -534,7 +535,7 @@
if not 0 <= x <= 0x10FFFF:
raise oefmt(space.w_TypeError,
"character mapping must be in range(0x110000)")
- return unichr(x)
+ return UNICHR(x)
elif space.is_w(w_ch, space.w_None):
# Charmap may return None
return errorchar
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit