Message78140
I believe the current pyport.h for windows x64 has some problems. It
does not work for compilers which are not MS ones, because building
against the official binary (python 2.6) relies on features which are
not enabled unless MS_WIN64 is defined, and the later is not defined if
an extension is not built with MS compiler.
As a simple example:
#include <Python.h>
int main()
{
printf("sizeof(Py_intptr_t) = %d\n", sizeof(Py_intptr_t));
return 0;
}
If you build this with MS compiler, you get the expected
sizeof(Py_intptr_t) = 8, but with gcc, you get 4. Now, if I build the
test like:
gcc -I C:\Python26\include -DMS_WIN64 main.c
Then I got 8 as well.
I believe the attached patch should fix the problem (I have not tested
it, since building python on amd64). |
|
Date |
User |
Action |
Args |
2008-12-21 08:53:35 | cdavid | set | recipients:
+ cdavid |
2008-12-21 08:53:34 | cdavid | set | messageid: <1229849614.64.0.683517411932.issue4709@psf.upfronthosting.co.za> |
2008-12-21 08:53:33 | cdavid | link | issue4709 messages |
2008-12-21 08:53:32 | cdavid | create | |
|