From: Brian Curtin Date: Tue, 1 Jan 2013 18:21:35 +0000 (-0600) Subject: Set st_dev on Windows as unsigned long to match its DWORD type, related to the change... X-Git-Tag: v3.4.0a1~1722 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3d0b651180ddbff9198d1bf33028bce251420a9;p=thirdparty%2FPython%2Fcpython.git Set st_dev on Windows as unsigned long to match its DWORD type, related to the change to fix #11939. --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index e53e76cef559..3eec4c014b44 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1955,7 +1955,8 @@ _pystat_fromstructstat(STRUCT_STAT *st) PyStructSequence_SET_ITEM(v, 2, PyLong_FromLongLong((PY_LONG_LONG)st->st_dev)); #else - PyStructSequence_SET_ITEM(v, 2, PyLong_FromLong((long)st->st_dev)); + PyStructSequence_SET_ITEM(v, 2, + PyLong_FromUnsignedLong(st->st_dev)); #endif PyStructSequence_SET_ITEM(v, 3, PyLong_FromLong((long)st->st_nlink)); PyStructSequence_SET_ITEM(v, 4, PyLong_FromLong((long)st->st_uid));