cpython: 66398e1307f4 (original) (raw)
Mercurial > cpython
changeset 86621:66398e1307f4
Issue4905: use INVALID_FILE_ATTRIBUTES where appropriate. (Patch by Ulrich Eckhardt)
Tim Golden mail@timgolden.me.uk | |
---|---|
date | Fri, 25 Oct 2013 11:22:37 +0100 |
parents | 212b4b61fa05 |
children | 726191fafd81 |
files | Misc/ACKS Modules/posixmodule.c |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-)[+] [-] Misc/ACKS 1 Modules/posixmodule.c 10 |
line wrap: on
line diff
--- a/Misc/ACKS +++ b/Misc/ACKS @@ -342,6 +342,7 @@ Maxim Dzumanenko Walter Dörwald Hans Eckardt Rodolpho Eckhardt +Ulrich Eckhardt David Edelsohn John Edmonds Grant Edwards
--- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -487,7 +487,7 @@ int * but this value would get interpreted as (uid_t)-1 by chown * and its siblings. That's not what the user meant! So we * throw an overflow exception instead. (We already
* handled a real -1 with PyLong_AsLongAndOverflow() above.) [](#l2.7)
if (uid == (uid_t)-1) goto overflow;* handled a real -1 with PyLong_AsLongAndOverflow() above.)[](#l2.8) */[](#l2.9)
@@ -594,7 +594,7 @@ int * but this value would get interpreted as (gid_t)-1 by chown * and its siblings. That's not what the user meant! So we * throw an overflow exception instead. (We already
* handled a real -1 with PyLong_AsLongAndOverflow() above.) [](#l2.16)
if (gid == (gid_t)-1) goto overflow;* handled a real -1 with PyLong_AsLongAndOverflow() above.)[](#l2.17) */[](#l2.18)
@@ -2666,7 +2666,7 @@ os_access_impl(PyObject *self, path_t *p * (Directories cannot be read-only on Windows.) */ return_value = PyBool_FromLong(
(attr != 0xFFFFFFFF) &&[](#l2.25)
(attr != INVALID_FILE_ATTRIBUTES) &&[](#l2.26) (!(mode & 2) ||[](#l2.27) !(attr & FILE_ATTRIBUTE_READONLY) ||[](#l2.28) (attr & FILE_ATTRIBUTE_DIRECTORY)));[](#l2.29)
@@ -2938,7 +2938,7 @@ posix_chmod(PyObject *self, PyObject *ar attr = GetFileAttributesW(path.wide); else attr = GetFileAttributesA(path.narrow);
@@ -7795,7 +7795,7 @@ posix_dup(PyObject *self, PyObject *args if (!PyArg_ParseTuple(args, "i:dup", &fd)) return NULL;