[Pyrex] Platform dependent external declarations?

Stefan Behnel stefan_ml at behnel.de
Mon Feb 26 17:31:49 UTC 2007


Hi,

Francesc Altet wrote:
> I'm having difficulties when using external C types whose sign depends
> on the platform.  I'm using a library that defines 'hsize_t' as being
> 'unsigned long long' in Unix and 'signed long long' in Win32 (Win32
> doesn't support such an 'unsigned long long' type. My current approach
> is to declare it as 'signed long long', but that generates warnings when
> compiling the code on Unix (although the code works well):

You should consider doing this in a C-header file that you cimport where you
need it.

Stefan



More information about the Pyrex mailing list