[pypy-svn] r46287 - pypy/branch/pypy-more-rtti-inprogress/rpython/module

mwh at codespeak.net mwh at codespeak.net
Mon Sep 3 18:05:24 CEST 2007


Author: mwh
Date: Mon Sep  3 18:05:23 2007
New Revision: 46287

Modified:
   pypy/branch/pypy-more-rtti-inprogress/rpython/module/ll_os_environ.py
Log:
os.name is not a good way of distinguishing os x...


Modified: pypy/branch/pypy-more-rtti-inprogress/rpython/module/ll_os_environ.py
==============================================================================
--- pypy/branch/pypy-more-rtti-inprogress/rpython/module/ll_os_environ.py	(original)
+++ pypy/branch/pypy-more-rtti-inprogress/rpython/module/ll_os_environ.py	Mon Sep  3 18:05:23 2007
@@ -1,4 +1,4 @@
-import os
+import os, sys
 from pypy.annotation import model as annmodel
 from pypy.rpython.controllerentry import Controller
 from pypy.rpython.extfunc import register_external
@@ -127,7 +127,7 @@
 # ____________________________________________________________
 # Access to the 'environ' external variable
 
-if os.name.startswith('darwin'):
+if sys.platform.startswith('darwin'):
     CCHARPPP = lltype.Ptr(lltype.FixedSizeArray(rffi.CCHARPP, 1))
     _os_NSGetEnviron = rffi.llexternal('_NSGetEnviron', [], CCHARPPP,
                                        includes=['crt_externs.h'])



More information about the Pypy-commit mailing list