mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-138779: Use the dev_t converter for st_rdev (GH-138780) (#138926)
gh-138779: Use the dev_t converter for st_rdev (GH-138780)
This allows to support device numbers larger than 2**63-1.
(cherry picked from commit 43013f72f0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
77b4ed2a37
commit
4bb33ff1c1
2 changed files with 4 additions and 1 deletions
|
|
@ -2744,7 +2744,7 @@ _pystat_fromstructstat(PyObject *module, STRUCT_STAT *st)
|
|||
SET_ITEM(ST_BLOCKS_IDX, PyLong_FromLong((long)st->st_blocks));
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_STAT_ST_RDEV
|
||||
SET_ITEM(ST_RDEV_IDX, PyLong_FromLong((long)st->st_rdev));
|
||||
SET_ITEM(ST_RDEV_IDX, _PyLong_FromDev(st->st_rdev));
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_STAT_ST_GEN
|
||||
SET_ITEM(ST_GEN_IDX, PyLong_FromLong((long)st->st_gen));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue