mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Merged revisions 62805,62811,62841-62842,62848-62849,62853-62854 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62805 | christian.heimes | 2008-05-07 01:59:53 +0200 (Wed, 07 May 2008) | 1 line Re-added getbuildinfo.c solution item ........ r62811 | benjamin.peterson | 2008-05-07 04:23:43 +0200 (Wed, 07 May 2008) | 2 lines update .bzrignore ........ r62841 | christian.heimes | 2008-05-08 00:54:17 +0200 (Thu, 08 May 2008) | 1 line Replace more float hacks with correct math functions ........ r62842 | benjamin.peterson | 2008-05-08 01:11:54 +0200 (Thu, 08 May 2008) | 2 lines Practice EAFP, and revert 62787 ........ r62848 | raymond.hettinger | 2008-05-08 06:35:20 +0200 (Thu, 08 May 2008) | 1 line Frozensets do not benefit from autoconversion. ........ r62849 | raymond.hettinger | 2008-05-08 06:36:12 +0200 (Thu, 08 May 2008) | 1 line The __all__ variable forgot to expose the gcd() function. ........ r62853 | raymond.hettinger | 2008-05-08 09:23:30 +0200 (Thu, 08 May 2008) | 1 line Fix-up the enumerate type example and move it to the end. ........ r62854 | ronald.oussoren | 2008-05-08 12:34:39 +0200 (Thu, 08 May 2008) | 3 lines Fix for issue 1770190: platform.mac_ver() now returns the right version on OSX 10.4.10 ........
This commit is contained in:
parent
e580f5c55a
commit
e4ca8156ef
5 changed files with 33 additions and 19 deletions
|
@ -720,7 +720,17 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
|
|||
major = (sysv & 0xFF00) >> 8
|
||||
minor = (sysv & 0x00F0) >> 4
|
||||
patch = (sysv & 0x000F)
|
||||
release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
|
||||
|
||||
if (major, minor) >= (10, 4):
|
||||
# the 'sysv' gestald cannot return patchlevels
|
||||
# higher than 9. Apple introduced 3 new
|
||||
# gestalt codes in 10.4 to deal with this
|
||||
# issue (needed because patch levels can
|
||||
# run higher than 9, such as 10.4.11)
|
||||
major,minor,patch = _mac_ver_lookup(('sys1','sys2','sys3'))
|
||||
release = '%i.%i.%i' %(major, minor, patch)
|
||||
else:
|
||||
release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
|
||||
if sysu:
|
||||
major = int((sysu & 0xFF000000) >> 24)
|
||||
minor = (sysu & 0x00F00000) >> 20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue