On Sun, May 8, 2011 at 2:45 PM, Keith Goodman <kwgood...@gmail.com> wrote: > I'm writing a function that accepts four possible dtypes: int32, > int64, float32, float64. The function will call a C extension (wrapped > in Cython). What are the equivalent C types? int, long, float, double, > respectively? Will that work on all systems?
I think you're fine on float and double, but on many systems 'long' is 32 bits. #include <stdint.h> int32_t this_is_32_bits; int64_t this_is_64_bits; (There may still be compilers out there that don't come with stdint.h by default, but if you need to support them then you'll be able to find appropriate autoconf goo to create it, since it's a standard interface.) -- Nathaniel _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion