Commits

Brian Kearns  committed 78a4037

fix unichr_returns_surrogate when both host and target are narrow

  • Participants
  • Parent commits 2c19131

Comments (0)

Files changed (1)

File rpython/rlib/runicode.py

 # 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