[pypy-commit] pypy default: fix rpython

fijal noreply at buildbot.pypy.org
Sun Jan 27 19:54:49 CET 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r60534:b30e913b44ff
Date: 2013-01-27 20:53 +0200
http://bitbucket.org/pypy/pypy/changeset/b30e913b44ff/

Log:	fix rpython

diff --git a/rpython/rlib/runicode.py b/rpython/rlib/runicode.py
--- a/rpython/rlib/runicode.py
+++ b/rpython/rlib/runicode.py
@@ -31,7 +31,8 @@
         ch2 = ord(u[1])
         if 0xD800 <= ch1 <= 0xDBFF and 0xDC00 <= ch2 <= 0xDFFF:
             return (((ch1 - 0xD800) << 10) | (ch2 - 0xDC00)) + 0x10000
-    return ord(u)
+    assert len(u) == 1
+    return ord(u[0])
 
 if MAXUNICODE > sys.maxunicode:
     # A version of unichr which allows codes outside the BMP


More information about the pypy-commit mailing list