[issue11939] Implement stat.st_dev and os.path.samefile on windows

Serhiy Storchaka report at bugs.python.org
Tue Jan 1 10:26:51 CET 2013


Serhiy Storchaka added the comment:

> New changeset 3738d270c54a by Brian Curtin in branch 'default':
> st_dev/st_rdev should be unsigned long as dwVolumeSerialNumber, which it is
> set to, is a DWORD. This was fixed in #11939 and the overflow was
> mentioned in #10657 and seen by me on some machines.
> http://hg.python.org/cpython/rev/3738d270c54a

But than st_dev used as long in _pystat_fromstructstat(). Perhaps you should 
check if st_dev is negative and then select 
PyLong_FromLong/PyLong_FromLongLong or 
PyLong_FromUnsignedLong/PyLong_FromUnsignedLongLong.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11939>
_______________________________________


More information about the Python-bugs-list mailing list