[pypy-svn] r71823 - pypy/trunk/lib-python/modified-2.5.2/ctypes

arigo at codespeak.net arigo at codespeak.net
Fri Mar 5 18:56:48 CET 2010


Author: arigo
Date: Fri Mar  5 18:56:47 2010
New Revision: 71823

Modified:
   pypy/trunk/lib-python/modified-2.5.2/ctypes/__init__.py
Log:
Comment out the code that detects if we are on an old Mac.
Such Macs are too old for building pypy-c's on anyway.
Removes one of the only dependencies on the 'gestalt' module.


Modified: pypy/trunk/lib-python/modified-2.5.2/ctypes/__init__.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/ctypes/__init__.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/ctypes/__init__.py	Fri Mar  5 18:56:47 2010
@@ -23,21 +23,23 @@
     from _ctypes import FormatError
 
 DEFAULT_MODE = RTLD_LOCAL
-if _os.name == "posix" and _sys.platform == "darwin":
-    import gestalt
+## --- the following is skipped because we don't have 'gestalt' so far,
+## --- but we know pypy doesn't compile on Mac OS/X 10.3.
+##if _os.name == "posix" and _sys.platform == "darwin":
+##    import gestalt
+
+##    # 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.
 
-    # 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:
-        DEFAULT_MODE = RTLD_GLOBAL
+##    if gestalt.gestalt("sysv") < 0x1040:
+##        DEFAULT_MODE = RTLD_GLOBAL
 
 from _ctypes import FUNCFLAG_CDECL as _FUNCFLAG_CDECL, \
      FUNCFLAG_PYTHONAPI as _FUNCFLAG_PYTHONAPI



More information about the Pypy-commit mailing list