]> granicus.if.org Git - python/commitdiff
Set st_dev on Windows as unsigned long to match its DWORD type, related to the change...
authorBrian Curtin <brian@python.org>
Tue, 1 Jan 2013 18:21:35 +0000 (12:21 -0600)
committerBrian Curtin <brian@python.org>
Tue, 1 Jan 2013 18:21:35 +0000 (12:21 -0600)
Modules/posixmodule.c

index e53e76cef5595629c5165931fafb934633f4f4b1..3eec4c014b44af6c97f8489431a1529e284fbffb 100644 (file)
@@ -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));