diff options
author | Jay Freeman <saurik@saurik.com> | 2008-03-10 07:48:26 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-03-10 07:48:26 +0000 |
commit | 547b663d823a7f8d091ac65003be980136b7a47e (patch) | |
tree | c3753311db7f0f2a81cc57249d29b39f158e5213 /data/python/gestalt.diff | |
parent | 7d353333e44cedecaae6b2c12d871fe770b94ff6 (diff) |
Removed Python's dependency on Gestalt.
git-svn-id: http://svn.telesphoreo.org/trunk@181 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/python/gestalt.diff')
-rw-r--r-- | data/python/gestalt.diff | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/data/python/gestalt.diff b/data/python/gestalt.diff new file mode 100644 index 000000000..febf9c32b --- /dev/null +++ b/data/python/gestalt.diff @@ -0,0 +1,25 @@ +diff -ru Python-2.5.1/Lib/ctypes/__init__.py Python-2.5.1+iPhone/Lib/ctypes/__init__.py +--- Python-2.5.1/Lib/ctypes/__init__.py 2007-03-09 20:21:16.000000000 +0000 ++++ Python-2.5.1+iPhone/Lib/ctypes/__init__.py 2008-03-08 20:35:54.000000000 +0000 +@@ -24,19 +24,13 @@ + + DEFAULT_MODE = RTLD_LOCAL + if _os.name == "posix" and _sys.platform == "darwin": +- import gestalt ++ import platform + +- # gestalt.gestalt("sysv") returns the version number of the +- # currently active system file as BCD. +- # On OS X 10.4.6 -> 0x1046 +- # On OS X 10.2.8 -> 0x1028 +- # See also http://www.rgaros.nl/gestalt/ +- # + # On OS X 10.3, we use RTLD_GLOBAL as default mode + # because RTLD_LOCAL does not work at least on some + # libraries. + +- if gestalt.gestalt("sysv") < 0x1040: ++ if int(platform.release().split('.')[0]) < 8: + DEFAULT_MODE = RTLD_GLOBAL + + from _ctypes import FUNCFLAG_CDECL as _FUNCFLAG_CDECL, \ |