Commits

Brian Kearns  committed 0441dc0

fix charmap decode running on narrow python

  • Participants
  • Parent commits 75626e5
  • Branches stdlib-2.7.6

Comments (0)

Files changed (1)

File pypy/module/_codecs/interp_codecs.py

 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
             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