[Python-Dev] Re: [Patches] PC\config.[hc] changes for Win64

Trent Mick trentm@activestate.com
Mon, 8 May 2000 14:26:51 -0700


On Mon, May 08, 2000 at 10:16:42AM -0400, Guido van Rossum wrote:
> > The patch to config.h looks big but it really is not. These are the effective
> > changes:
> > - MS_WINxx are keyed off _WINxx
> > - SIZEOF_VOID_P is set to 8 for Win64
> > - COMPILER string is changed appropriately for Win64
>
> One thing worries me: if COMPILER is changed, that changes
> sys.platform to "win64", right?  I'm sure that will break plenty of
> code which currently tests for sys.platform=="win32" but really wants
> to test for any form of Windows.  Maybe sys.platform should remain
> win32?
> 

No, but yes. :( Actually I forgot to mention that my config.h patch changes
the PLATFORM #define from win32 to win64. So yes, you are correct. And, yes
(Sigh) you are right that this will break tests for sys.platform == "win32".

So I guess the simplest thing to do is to leave it as win32 following the
same reasoning for defining MS_WIN32 on Win64:

>  The idea is that the common case is
>  that code specific to Win32 will also work on Win64 rather than being
>  specific to Win32 (i.e. there is more the same than different in WIn32 and
>  Win64).
 

What if someone needs to do something in Python code for either Win32 or
Win64 but not both? Or should this never be necessary (not likely). I would
like Mark H's opinion on this stuff.


Trent

-- 
Trent Mick
trentm@activestate.com