Win32 extensions using the .NET SDK and the Win32 Platform SDK

Mike C. Fletcher mcfletch at home.com
Tue Jun 26 02:47:57 EDT 2001


Last month I did some preliminary tests to see if these two free packages
could be used for making Python extensions on Win32.  It seems to work fine
(see previous thread referenced below), save for one error.  I've just
hacked around that, and am looking for a knowledgeable person to assure me
that my hack isn't redefining truth or anything, and potentially to ask if
an IFDEF could be added to config.h .

The problem is at line 385 (in the Python 2.0 distribution):

#if defined(MS_WINDOWS) && !defined(MS_WIN64)
typedef long intptr_t;
typedef unsigned long uintptr_t;
#endif

In the free tools, the definitions are:

8<___ net sdk\include\stdarg.h # 48 ______
#ifndef _UINTPTR_T_DEFINED
#ifdef  _WIN64
typedef unsigned __int64    uintptr_t;
#else
typedef _W64 unsigned int   uintptr_t;
#endif
#define _UINTPTR_T_DEFINED
#endif

8<___ net sdk\include\io.h # 48 ______
#ifndef _INTPTR_T_DEFINED
#ifdef  _WIN64
typedef __int64             intptr_t;
#else
typedef _W64 int            intptr_t;
#endif
#define _INTPTR_T_DEFINED
#endif

My hack was to change the following in the above...

typedef _W64 int            intptr_t;
to
typedef _W64 long            intptr_t;

and

typedef _W64 unsigned int   uintptr_t;
to
typedef _W64 unsigned long   uintptr_t;


Now, I can compile PyOpenGL and run all the demos and tests for both Python
2.0 and 2.1, but I have _no_ idea what I'm doing here, so I'd ask if anyone
with a clue could hold me and whisper that everything'll be all right :) .

References:
http://groups.google.com/groups?ic=1&th=dc85d5decb14f5ca,5

Hold me,
Mike





More information about the Python-list mailing list