In C extension .pyd, sizeof INT64 = 4?

Tommy Nordgren tommy.nordgren at
Wed Jun 13 12:16:02 CEST 2007

On 12 jun 2007, at 12.03, Allen wrote:

> My C extension works wrong, and debug it, found that sizeof (INT64) =
> 4, not 8.
> I compile on Windows XP platform.
> Please tell me how to fix it to support INT64?
> Thanks.
> --  
  	On compilers that can gnerate both 32 and 64 bit executables, the  
size of some
data types vary according to compiler options.
You are probably using a typedef long INT64;
In order for INT64 to always be 64 bits/8bytes you should declare:
typedef long long INT64;
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
tommy.nordgren at

More information about the Python-list mailing list