Commit 81a1f7fd authored by Stefan Behnel's avatar Stefan Behnel

fix comparison of single character unicode literals

--HG--
extra : rebase_source : 5e91ffb0a20724dc92084bb68288cb6000814dca
parent 4c77de2b
......@@ -8696,7 +8696,10 @@ class CmpNode(object):
return type2
elif type1_can_be_int:
if type2_can_be_int:
return PyrexTypes.c_uchar_type
if Builtin.unicode_type in (type1, type2):
return PyrexTypes.c_py_ucs4_type
else:
return PyrexTypes.c_uchar_type
return None
......
......@@ -29,6 +29,14 @@ def compare_klingon():
print(char_KLINGON == u'B')
def single_uchar_compare():
"""
>>> single_uchar_compare()
"""
assert u'\u0100' < u'\u0101'
assert u'\u0101' > u'\u0100'
from cpython.unicode cimport PyUnicode_FromOrdinal
import sys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment