Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r60924:78a4037ea447
Date: 2013-02-07 03:06 -0500
http://bitbucket.org/pypy/pypy/changeset/78a4037ea447/

Log:    fix unichr_returns_surrogate when both host and target are narrow

diff --git a/rpython/rlib/runicode.py b/rpython/rlib/runicode.py
--- a/rpython/rlib/runicode.py
+++ b/rpython/rlib/runicode.py
@@ -18,7 +18,7 @@
 # or in unicodedata in pypy
 
 def unichr_returns_surrogate(c):
-    if c <= sys.maxunicode or c > MAXUNICODE:
+    if c <= 0xffff or c > 0x10ffff:
         return unichr(c)
     else:
         c -= 0x10000
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to