[Python-Dev] Is Py_WIN_WIDE_FILENAMES still alive?
Mark Hammond
mhammond at skippinet.com.au
Mon Apr 28 06:41:18 CEST 2008
> Hello. I noticed when I removes following line in trunk/PC/pyconfig.h
>
> #define Py_WIN_WIDE_FILENAMES
>
> _fileio.c and posixmodule.c (and maybe more) cannot be compiled on
> Windows.
>
> When Py_WIN_WIDE_FILENAMES is not defined, how should python behave?
>
> - call posix functions like open(2)
>
> - call ANSI Win32 APIs like MoveFileA
>
> Or maybe this macro is not used anymore?
I believe the macro should be removed, as Python currently assumes Unicode
APIs are available in a number of places. This consistent with the versions
of Windows Python currently supports. It is possible that patches would be
accepted which enable Python to be built without this functionality - in
which case the next-best behavior would probably be to convert Unicode to
MBCS encoded strings and call the *A versions of the API. Looking at the
history for posixmodule.c etc will offer some clues as to how this could
best be done.
Cheers,
Mark
More information about the Python-Dev
mailing list