In C extension .pyd, sizeof INT64 = 4?

Allen pruyu.chen at gmail.com
Tue Jun 12 21:00:26 EDT 2007


On 6 13 ,   4 06 , "Martin v. Lo"wis" <mar... at v.loewis.de> wrote:
> Allen schrieb:
>
> > 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?
>
> What *is* INT64? It's not a builtin type of standard C, it isn't
> defined by Microsoft C, and it isn't predefined by Python.
>
> So it must be something that you have defined, and apparently
> incorrectly. How did you define it?
>
> Regards,
> Martin

Thanks for your reply.

I defined in this way:

#ifndef WIN32
typedef long long	INT64;
#else
typedef __int64	INT64;
#endif

I feel it strange that when I use INT64 as local variable, it will run
error.
When I change the local variable to be static or global, it will be
ok.




More information about the Python-list mailing list