@@ -487,7 +487,7 @@ _Py_Uid_Converter(PyObject *obj, void *p)
487487 * but this value would get interpreted as (uid_t)-1 by chown
488488 * and its siblings. That's not what the user meant! So we
489489 * throw an overflow exception instead. (We already
490- * handled a real -1 with PyLong_AsLongAndOverflow() above.)
490+ * handled a real -1 with PyLong_AsLongAndOverflow() above.)
491491 */
492492 if (uid == (uid_t )- 1 )
493493 goto overflow ;
@@ -594,7 +594,7 @@ _Py_Gid_Converter(PyObject *obj, void *p)
594594 * but this value would get interpreted as (gid_t)-1 by chown
595595 * and its siblings. That's not what the user meant! So we
596596 * throw an overflow exception instead. (We already
597- * handled a real -1 with PyLong_AsLongAndOverflow() above.)
597+ * handled a real -1 with PyLong_AsLongAndOverflow() above.)
598598 */
599599 if (gid == (gid_t )- 1 )
600600 goto overflow ;
@@ -2666,7 +2666,7 @@ os_access_impl(PyObject *self, path_t *path, int mode, int dir_fd, int effective
26662666 * (Directories cannot be read-only on Windows.)
26672667 */
26682668 return_value = PyBool_FromLong (
2669- (attr != 0xFFFFFFFF ) &&
2669+ (attr != INVALID_FILE_ATTRIBUTES ) &&
26702670 (!(mode & 2 ) ||
26712671 !(attr & FILE_ATTRIBUTE_READONLY ) ||
26722672 (attr & FILE_ATTRIBUTE_DIRECTORY )));
@@ -2938,7 +2938,7 @@ posix_chmod(PyObject *self, PyObject *args, PyObject *kwargs)
29382938 attr = GetFileAttributesW (path .wide );
29392939 else
29402940 attr = GetFileAttributesA (path .narrow );
2941- if (attr == 0xFFFFFFFF )
2941+ if (attr == INVALID_FILE_ATTRIBUTES )
29422942 result = 0 ;
29432943 else {
29442944 if (mode & _S_IWRITE )
@@ -7795,7 +7795,7 @@ posix_dup(PyObject *self, PyObject *args)
77957795
77967796 if (!PyArg_ParseTuple (args , "i:dup" , & fd ))
77977797 return NULL ;
7798-
7798+
77997799 fd = _Py_dup (fd );
78007800 if (fd == -1 )
78017801 return NULL ;
0 commit comments