Oh, I didn't know that."if defined(MS_WIN64) || defined(MS_WINDOWS)" is a common pattern in the Python source code. I simplified the #ifdef in many places: http://hg.python.org/cpython/rev/dfc020b4b123
I also read that MS_WIN32 is always defined on Windows. "#ifdef MS_WIN32" (used in many files, especially in ctypes) can probably be replaced with "#ifdef MS_WINDOWS" for consistency. MS_WIN32 should only be used to check if the API is Win64: /* MSVC defines _WINxx to differentiate the windows platform types Note that for compatibility reasons _WIN32 is defined on Win32 *and* on Win64. For the same reasons, in Python, MS_WIN32 is defined on Win32 *and* Win64. Win32 only code must therefore be guarded as follows: #if defined(MS_WIN32) && !defined(MS_WIN64) Some modules are disabled on Itanium processors, therefore we have MS_WINI64 set for those targets, otherwise MS_WINX64 */ Victor 2013/6/25 Jeremy Kloth <jeremy.kl...@gmail.com>: > On Mon, Jun 24, 2013 at 3:48 PM, victor.stinner > <python-check...@python.org> wrote: >> +#if defined(MS_WIN64) || defined(MS_WINDOWS) > > This test could be reduced to simply `#ifdef MS_WINDOWS`. See PC\pyconfig.h _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com