This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients ixokai, nadeem.vawda, ned.deily, neologix, pitrou, python-dev, ronaldoussoren, sdaoden, skrah, vstinner
Date 2011-06-08.00:22:16
SpamBayes Score 0.054715995
Marked as misclassified No
Message-id <1307492537.22.0.51370936094.issue11277@psf.upfronthosting.co.za>
In-reply-to
Content
Victor, please do not use magic constants like that in C.  The symbolic values are available in include files:

#include <CoreServices/CoreServices.h>
SInt32 major = 0;
SInt32 minor = 0;   
Gestalt(gestaltSystemVersionMajor, &major);
Gestalt(gestaltSystemVersionMinor, &minor);
if ((major == 10 && minor >= 7) || major >= 11) { ... }

(See, for instance, http://www.cocoadev.com/index.pl?DeterminingOSVersion and http://stackoverflow.com/questions/2115373/os-version-checking-in-cocoa. The code in platform and _gestalt.c could stand to be updated at some point.)

But, again, mmap should *not* be changed until 10.7 has been released and the Apple fix is verified and only if it makes sense to add the additional complexity.
History
Date User Action Args
2011-06-08 00:22:17ned.deilysetrecipients: + ned.deily, ixokai, ronaldoussoren, pitrou, vstinner, nadeem.vawda, skrah, neologix, sdaoden, python-dev
2011-06-08 00:22:17ned.deilysetmessageid: <1307492537.22.0.51370936094.issue11277@psf.upfronthosting.co.za>
2011-06-08 00:22:16ned.deilylinkissue11277 messages
2011-06-08 00:22:16ned.deilycreate