diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-03-09 17:43:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 17:43:39 (GMT) |
commit | 68d29809405dc766966b2b973b8597212fbc3dbd (patch) | |
tree | b57d4ec2ee37817d3f70cd560af75ceb53c4287a /Python/fileutils.c | |
parent | 26d013e00f9d4adbcf3e084bbc890c799ff70407 (diff) | |
download | cpython-68d29809405dc766966b2b973b8597212fbc3dbd.zip cpython-68d29809405dc766966b2b973b8597212fbc3dbd.tar.gz cpython-68d29809405dc766966b2b973b8597212fbc3dbd.tar.bz2 |
bpo-29619: Convert st_ino using unsigned integer (#557) (#584)
bpo-29619: os.stat() and os.DirEntry.inodeo() now convert inode
(st_ino) using unsigned integers.
(cherry picked from commit 0f6d73343d342c106cda2219ebb8a6f0c4bd9b3c)
(Misc/NEWS conflict handled manually.)
Diffstat (limited to 'Python/fileutils.c')
-rw-r--r-- | Python/fileutils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index e84d66e..f3764e4 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -583,7 +583,7 @@ _Py_attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *info, ULONG reparse_tag, FILE_TIME_to_time_t_nsec(&info->ftLastWriteTime, &result->st_mtime, &result->st_mtime_nsec); FILE_TIME_to_time_t_nsec(&info->ftLastAccessTime, &result->st_atime, &result->st_atime_nsec); result->st_nlink = info->nNumberOfLinks; - result->st_ino = (((__int64)info->nFileIndexHigh)<<32) + info->nFileIndexLow; + result->st_ino = (((uint64_t)info->nFileIndexHigh) << 32) + info->nFileIndexLow; if (reparse_tag == IO_REPARSE_TAG_SYMLINK) { /* first clear the S_IFMT bits */ result->st_mode ^= (result->st_mode & S_IFMT); @@ -653,7 +653,7 @@ _Py_fstat_noraise(int fd, struct _Py_stat_struct *status) _Py_attribute_data_to_stat(&info, 0, status); /* specific to fstat() */ - status->st_ino = (((__int64)info.nFileIndexHigh)<<32) + info.nFileIndexLow; + status->st_ino = (((uint64_t)info.nFileIndexHigh) << 32) + info.nFileIndexLow; return 0; #else return fstat(fd, status); |