[Cython] Potential 32bit linux issue
Dieter Vandenbussche
dieterv77 at gmail.com
Sun Jan 6 02:17:28 CET 2013
Hi, this is my first time posting to this list, hopefully i'm not wasting
anyone's time.
i believe i may have encountered an issue on 32bit linux using cython.
Here's a small example pyx file that illustrates the potential issue:
#Begin pyx file
cdef extern from "stdint.h":
enum: INT64_MIN
cpdef f():
cdef long long x = INT64_MIN
print x
print INT64_MIN
#End pyx file
The first print statement works as expected, the second does not (and
prints "0"). Looking at the C code that was generated, it looks like
the second print statement is resulting in a call to PyInt_FromLong, which
I believe might be the source of an overflow.
Thanks for taking the time to take a look.
dieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20130105/cd09dd3b/attachment.html>
More information about the cython-devel
mailing list