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.
I find it is strange. In an exe win32 console project, sizeof(INT64) =
8.
My code is just like this:
/* my.h header file */
#ifdef __cplusplus
extern "C" {
#endif
static PyObject* method(PyObject* self, PyObject *args);
#idef __cplusplus
}
#endif
/* my.cpp source file */
PyObject* method(PyObject* self, PyObject *args)
{
INT64 nValue; /* LINE_HERE */
INT32 nRet;
nRet = DoSomeCOperations(nValue);
return PyBuildValue("i", nRet);
}
If I changed INT64 nValue to be static INT64 nValue at LINE_HERE, it
is ok.
Why?