classification
Title: struni: Various patches for windows
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: amaury.forgeotdarc, gvanrossum (2)
Priority: normal Keywords patch

Created on 2007-07-15 22:54 by amaury.forgeotdarc, last changed 2008-01-06 22:29 by admin.

Files
File name Uploaded Description Edit Remove
bltin.diff amaury.forgeotdarc, 2007-07-15 22:54 Compilation with Microsoft compilers
unicode.diff amaury.forgeotdarc, 2007-07-15 22:55 Crash in PyUnicode_FromFormat
windowserror.diff amaury.forgeotdarc, 2007-07-15 22:56 str8 problems in WindowsError, when message contains accents
Messages (4)
msg52883 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) Date: 2007-07-15 22:54
Here are three patches for errors I found by running random tests on windows:

1 - bltin.diff: MSVC compiler does not accept #ifdef inside macro parameters (http://support.microsoft.com/kb/38291). 
Seems ugly, but I think I respected the spirit of the PyDoc_ macros.

2 - unicode.diff: a 'off-by-one' pointer error in PyUnicode_FromFormat that crashes the interpreter when an item cannot be converted by %U:
print(OSError(1, str8(b'\xe9')))

3 - windowserror.diff: UnicodeDecodeError is raised when the error message returned by the w32 function FormatMessage() contains French accented characters.
(it crashed the interpreted before patch#2...)
msg52884 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) Date: 2007-07-15 22:55
File Added: unicode.diff
msg52885 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) Date: 2007-07-15 22:56
File Added: windowserror.diff
msg52886 - (view) Author: Guido van Rossum (gvanrossum) Date: 2007-07-16 20:47
Committed revision 56403.

I can't verify #3 since I don't have a Windows box, but I trust you.
History
Date User Action Args
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: + Python 3.0
2007-07-15 22:54:04amaury.forgeotdarccreate