Re: [Cython] Bug in ord(Py_UNICODE) optimization

2011-05-27 Thread Stefan Behnel
John Ehresman, 27.05.2011 21:55: ord() applied to a Py_UNICODE typed variable seems to yield a 1 character unicode string rather than an integer. The following doctest fails when added to unicodefunction.pyx: def Py_UNICODE_ord(unicode s): """ >>> Py_UNICODE_ord(u' ') 32 """

[Cython] Bug in ord(Py_UNICODE) optimization

2011-05-27 Thread John Ehresman
Hi, ord() applied to a Py_UNICODE typed variable seems to yield a 1 character unicode string rather than an integer. The following doctest fails when added to unicodefunction.pyx: def Py_UNICODE_ord(unicode s): """ >>> Py_UNICODE_ord(u' ') 32 """ cdef Py_UNICODE u u =