[New-bugs-announce] [issue4653] Patch to fix typos for Py3K

Johnny Lee report at bugs.python.org
Sat Dec 13 08:56:56 CET 2008


New submission from Johnny Lee <typo.pl at gmail.com>:

I ran my typo.pl perl script that locates possible C/C++ typos.

I found four that looked valid.

Two of the typos were in the Python directory {pythonrun.c, 
dynload_win.c}, two were in PC/bdist_wininst {install.c, extract.c}.

Python/dynload_win.c:
Win32 API FormatMessageW() expects the 6th parameter to be the count of 
characters, NOT the count of bytes.

Python/pythonrun.c:
The source code contains "if (ferr != NULL || ferr != Py_None)". This 
does not work as expected - if ferr == NULL, then the second part of 
the if expression will succeed. Look at the code handling fout about 8 
lines up to see the correct code.

PC/bdist_wininst/extract.c:
Win32 API CreateFileMapping returns NULL on error, not 
INVALID_HANDLE_VALUE.

PC/bdist_wininst/install.c:
Win32 API CreateFileMapping returns NULL on error, not 
INVALID_HANDLE_VALUE.

----------
components: Installation, Interpreter Core
files: py30diff.txt
messages: 77718
nosy: typo.pl
severity: normal
status: open
title: Patch to fix typos for Py3K
versions: Python 3.0
Added file: http://bugs.python.org/file12335/py30diff.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4653>
_______________________________________


More information about the New-bugs-announce mailing list