[MERGE] Fast _walkdirs for win32

Alexander Belchenko bialix at ukr.net
Thu Jul 17 19:46:12 BST 2008

John Arbash Meinel пишет:
> Alexander Belchenko wrote:
> |
> | So even if my compiler is ugly or broken, there is the bug in Pyrex too.
> | It should use MS_WINDOWS constant instead of WIN32, according to
> | C:\Python25\include\pyconfig.h
> Well, actually, I think VS C++ sets the member "_WIN32" not "WIN32".
> I'm happy to update our setup.py to pass the keyword arguments to the
> next level.
> I'm *not* sure about using MS_WINDOWS, mostly because in pyconfig.h I
> only see it set in _WIN32_WCE which is the embedded edition of windows,

I disagree. According to comments in pyconfig.h and looking at real code I see
it's defined outside of any other #if block. Actually comments say:

	The code specific to Windows should be wrapped around one of
	the following #defines

	MS_WIN64 - Code specific to the MS Win64 API
	MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all 	supported APIs)
	MS_WINDOWS - Code specific to Windows, but all versions.
	MS_WINCE - Code specific to Windows CE

And the same comments explicitly called WIN32 symbol as deprecated:

	NOTE: The following symbols are deprecated:

But I don't know in which Python version it was deprecated. May be Mark Hammond knows?

> Could we do define_macro([('WIN32', '_WIN32')]) ?

I have no objections. It works for me too.

More information about the bazaar mailing list