mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Merged revisions 63460,63464 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r63460 | ronald.oussoren | 2008-05-18 15:54:47 -0500 (Sun, 18 May 2008) | 6 lines - Add unittests for platform.mac_ver (or rather, ensure that the unittest for that function actually tests something on OSX). - Add documentation to platform.mac_ver that explains why the middle element of the return value will not contain useful information. ........ r63464 | benjamin.peterson | 2008-05-18 17:07:42 -0500 (Sun, 18 May 2008) | 2 lines fix test_platform (os was not imported) ........
This commit is contained in:
parent
8a4e0ab51b
commit
856ff5f986
2 changed files with 30 additions and 6 deletions
|
@ -729,7 +729,11 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
|
|||
release = '%i.%i.%i' %(major, minor, patch)
|
||||
else:
|
||||
release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
|
||||
|
||||
if sysu:
|
||||
# NOTE: this block is left as documentation of the
|
||||
# intention of this function, the 'sysu' gestalt is no
|
||||
# longer available and there are no alternatives.
|
||||
major = int((sysu & 0xFF000000) >> 24)
|
||||
minor = (sysu & 0x00F00000) >> 20
|
||||
bugfix = (sysu & 0x000F0000) >> 16
|
||||
|
@ -742,6 +746,8 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
|
|||
0x60:'beta',
|
||||
0x80:'final'}.get(stage,'')
|
||||
versioninfo = (version,stage,nonrel)
|
||||
|
||||
|
||||
if sysa:
|
||||
machine = {0x1: '68k',
|
||||
0x2: 'PowerPC',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue