[Cython] Use of long type for intermediate integral variables

Stefan Behnel stefan_ml at behnel.de
Thu Jul 2 09:58:41 CEST 2015


Robert McGibbon schrieb am 02.07.2015 um 09:49:
>> "libc.stdint.int64_t" is hand-wavingly declared as "long"
> 
> There are some deeper issues in the rest of your message, but as a
> preliminary matter, isn't this a clear error for linux-32 and windows?

No, it's not. That's just what Cython sees. The C compiler then sees the
exact platform specific type. And as the vast amount of Cython code out
there shows, it's usually not a problem in practice. Cython is designed to
handle most of these "platform specific type" issues at C compile time
rather than C code generation time. But as your example shows, it can't
always hide the details entirely. And there can be bugs.

Stefan



More information about the cython-devel mailing list