[Python-checkins] cpython: Set st_dev on Windows as unsigned long to match its DWORD type, related to the

brian.curtin python-checkins at python.org
Tue Jan 1 19:21:53 CET 2013


http://hg.python.org/cpython/rev/61bada808b34
changeset:   81195:61bada808b34
parent:      81193:92990dd91b07
user:        Brian Curtin <brian at python.org>
date:        Tue Jan 01 12:21:35 2013 -0600
summary:
  Set st_dev on Windows as unsigned long to match its DWORD type, related to the change to fix #11939.

files:
  Modules/posixmodule.c |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1955,7 +1955,8 @@
     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));

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list