Issue 4905: Use INVALID_FILE_ATTRIBUTES instead of magic numbers (original ) (raw )Created on 2009-01-10 09:41 by eckhardt , last changed 2022-04-11 14:56 by admin . This issue is now closed .
Messages (5)
msg79535 - (view)
Author: Ulrich Eckhardt (eckhardt)
Date: 2009-01-10 09:41
GetFileAttributes[W|A] returns a DWORD with this value when it couldn't determine the file's attributes. In the Python codebase, there are basically three values this is compared with, the above macro, 0xffffffff and (DWORD)-1, it should only be the macro. However, this macro isn't defined in some SDKs (I don't remember if those were early MSVC versions or some MS Windows CE SDKs), so we also need to work around that. I'm currently preparing a patch that resolves those including the workaround when the macro isn't defined.
msg79544 - (view)
Author: Ulrich Eckhardt (eckhardt)
Date: 2009-01-10 14:54
The patch replaces remaining magic numbers with INVALID_FILE_ATTRIBUTES.
msg79712 - (view)
Author: Gabriel Genellina (ggenellina)
Date: 2009-01-13 01:50
The patch looks fine to me
msg201228 - (view)
Author: Roundup Robot (python-dev)
Date: 2013-10-25 10:23
New changeset 66398e1307f4 by Tim Golden in branch 'default': Issue4905 : use INVALID_FILE_ATTRIBUTES where appropriate. (Patch by Ulrich Eckhardt) http://hg.python.org/cpython/rev/66398e1307f4
msg201229 - (view)
Author: Tim Golden (tim.golden) *
Date: 2013-10-25 10:34
Fixed on tip. Thanks for the issue and the original patch.
History
Date
User
Action
Args
2022-04-11 14:56:44
admin
set
github: 49155
2013-10-25 10:34:56
tim.golden
set
status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2013-10-25 10:23:36
python-dev
set
nosy: + python-dev messages: +
2013-10-24 14:42:24
tim.golden
set
versions: + Python 3.4, - Python 3.2
2013-10-24 14:42:13
tim.golden
set
assignee: tim.golden
2010-09-04 00:33:32
pitrou
set
nosy: + tim.golden , brian.curtin stage: patch reviewcomponents: + Extension Modules, Windows, - Interpreter Coreversions: + Python 3.2, - Python 2.7
2009-01-13 01:50:23
ggenellina
set
nosy: + ggenellina messages: +
2009-01-10 14:54:36
eckhardt
set
files: + python-2.7-fileattrib-magic.0.patch keywords: + patch messages: +
2009-01-10 09:41:54
eckhardt
create