Jakub Wilk schrieb am 30.08.2015 um 19:44:
> DEF silently converts byte strings to Unicode strings:
>
> $ cat testcase.pyx
> DEF ABYTE = b'a'
> print type(ABYTE)
>
> $ python --version
> Python 2.7.10
>
> $ python -c 'import pyximport as p; p.install(); import testcase'
>
>
> Tested with Cytho
Something like:
cython.cast('object', x)
won't work because base_type will be None in ExprNodes.py:9323.
Here's is a simple fix, albeit I'm not sure the best one:
base_type = self.base_type.analyse(env) if self.base_type else py_object_type
Cheers
--
Carlos
___
Jakub Wilk schrieb am 30.08.2015 um 21:29:
> Tested with Cython 0.23.1 on i386. You will probably need a bigger number
> to trigger it on a 64-bit machine.
>
> $ cython test.pyx
>
> Error compiling Cython file:
>
> ...
> DEF X = 0x811C9