bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH… · python/cpython@ffbb6f7 (original) (raw)
`@@ -1934,14 +1934,8 @@ _pystat_fromstructstat(STRUCT_STAT *st)
`
1934
1934
`return NULL;
`
1935
1935
``
1936
1936
`PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode));
`
1937
``
`-
#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS)
`
1938
1937
`Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino));
`
1939
``
`-
PyStructSequence_SET_ITEM(v, 1,
`
1940
``
`-
PyLong_FromUnsignedLongLong(st->st_ino));
`
1941
``
`-
#else
`
1942
``
`-
Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino));
`
1943
``
`-
PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino));
`
1944
``
`-
#endif
`
``
1938
`+
PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLongLong(st->st_ino));
`
1945
1939
`#ifdef MS_WINDOWS
`
1946
1940
`PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev));
`
1947
1941
`#else
`
`@@ -1955,12 +1949,8 @@ _pystat_fromstructstat(STRUCT_STAT *st)
`
1955
1949
`PyStructSequence_SET_ITEM(v, 4, _PyLong_FromUid(st->st_uid));
`
1956
1950
`PyStructSequence_SET_ITEM(v, 5, _PyLong_FromGid(st->st_gid));
`
1957
1951
`#endif
`
1958
``
`-
#ifdef HAVE_LARGEFILE_SUPPORT
`
1959
``
`-
PyStructSequence_SET_ITEM(v, 6,
`
1960
``
`-
PyLong_FromLongLong((long long)st->st_size));
`
1961
``
`-
#else
`
1962
``
`-
PyStructSequence_SET_ITEM(v, 6, PyLong_FromLong(st->st_size));
`
1963
``
`-
#endif
`
``
1952
`+
Py_BUILD_ASSERT(sizeof(long long) >= sizeof(st->st_size));
`
``
1953
`+
PyStructSequence_SET_ITEM(v, 6, PyLong_FromLongLong(st->st_size));
`
1964
1954
``
1965
1955
`#if defined(HAVE_STAT_TV_NSEC)
`
1966
1956
`ansec = st->st_atim.tv_nsec;
`
`@@ -11484,11 +11474,8 @@ DirEntry_inode(DirEntry *self)
`
11484
11474
`Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->win32_file_index));
`
11485
11475
`return PyLong_FromUnsignedLongLong(self->win32_file_index);
`
11486
11476
`#else /* POSIX */
`
11487
``
`-
#ifdef HAVE_LARGEFILE_SUPPORT
`
11488
``
`-
return PyLong_FromLongLong((long long)self->d_ino);
`
11489
``
`-
#else
`
11490
``
`-
return PyLong_FromLong((long)self->d_ino);
`
11491
``
`-
#endif
`
``
11477
`+
Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->d_ino));
`
``
11478
`+
return PyLong_FromUnsignedLongLong(self->d_ino);
`
11492
11479
`#endif
`
11493
11480
`}
`
11494
11481
``