Commit | Line | Data |
---|---|---|
b1f6407c FF |
1 | https://github.com/python/cpython/commit/50e86033de85294d87b7e942701d456342abde8e |
2 | ||
3 | diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c | |
4 | index e8c15a9473c..5c739180ea6 100644 | |
5 | --- a/Modules/posixmodule.c | |
6 | +++ b/Modules/posixmodule.c | |
7 | @@ -1927,14 +1927,8 @@ _pystat_fromstructstat(STRUCT_STAT *st) | |
8 | return NULL; | |
9 | ||
10 | PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode)); | |
11 | -#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS) | |
12 | Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino)); | |
13 | - PyStructSequence_SET_ITEM(v, 1, | |
14 | - PyLong_FromUnsignedLongLong(st->st_ino)); | |
15 | -#else | |
16 | - Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino)); | |
17 | - PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino)); | |
18 | -#endif | |
19 | + PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLongLong(st->st_ino)); | |
20 | #ifdef MS_WINDOWS | |
21 | PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev)); | |
22 | #else | |
23 | @@ -1948,12 +1942,8 @@ _pystat_fromstructstat(STRUCT_STAT *st) | |
24 | PyStructSequence_SET_ITEM(v, 4, _PyLong_FromUid(st->st_uid)); | |
25 | PyStructSequence_SET_ITEM(v, 5, _PyLong_FromGid(st->st_gid)); | |
26 | #endif | |
27 | -#ifdef HAVE_LARGEFILE_SUPPORT | |
28 | - PyStructSequence_SET_ITEM(v, 6, | |
29 | - PyLong_FromLongLong((long long)st->st_size)); | |
30 | -#else | |
31 | - PyStructSequence_SET_ITEM(v, 6, PyLong_FromLong(st->st_size)); | |
32 | -#endif | |
33 | + Py_BUILD_ASSERT(sizeof(long long) >= sizeof(st->st_size)); | |
34 | + PyStructSequence_SET_ITEM(v, 6, PyLong_FromLongLong(st->st_size)); | |
35 | ||
36 | #if defined(HAVE_STAT_TV_NSEC) | |
37 | ansec = st->st_atim.tv_nsec; | |
38 | @@ -11451,11 +11441,8 @@ os_DirEntry_inode_impl(DirEntry *self) | |
39 | Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->win32_file_index)); | |
40 | return PyLong_FromUnsignedLongLong(self->win32_file_index); | |
41 | #else /* POSIX */ | |
42 | -#ifdef HAVE_LARGEFILE_SUPPORT | |
43 | - return PyLong_FromLongLong((long long)self->d_ino); | |
44 | -#else | |
45 | - return PyLong_FromLong((long)self->d_ino); | |
46 | -#endif | |
47 | + Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->d_ino)); | |
48 | + return PyLong_FromUnsignedLongLong(self->d_ino); | |
49 | #endif | |
50 | } | |
51 |