diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-02 16:22:23 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-02 16:22:23 (GMT) |
commit | 404fa924c373da02965206d6a90a65d4a46bd046 (patch) | |
tree | 721c9f3b7876ecfb20bd6b933003dad0f4b341cb /Modules/posixmodule.c | |
parent | cc85a156aea9d5b02ce08f05a9aa543a2be575f9 (diff) | |
download | cpython-404fa924c373da02965206d6a90a65d4a46bd046.zip cpython-404fa924c373da02965206d6a90a65d4a46bd046.tar.gz cpython-404fa924c373da02965206d6a90a65d4a46bd046.tar.bz2 |
Issue #16841: Set st_dev on Windows as unsigned long to match its DWORD type.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index e53e76c..bd483fa 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1951,7 +1951,9 @@ _pystat_fromstructstat(STRUCT_STAT *st) #else PyStructSequence_SET_ITEM(v, 1, PyLong_FromLong((long)st->st_ino)); #endif -#if defined(HAVE_LONG_LONG) && !defined(MS_WINDOWS) +#ifdef MS_WINDOWS + PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev)); +#elif defined(HAVE_LONG_LONG) PyStructSequence_SET_ITEM(v, 2, PyLong_FromLongLong((PY_LONG_LONG)st->st_dev)); #else |