[pypy-svn] r44364 - in pypy/dist/pypy/rpython: lltypesystem module

afa at codespeak.net afa at codespeak.net
Tue Jun 19 13:37:59 CEST 2007


Author: afa
Date: Tue Jun 19 13:37:58 2007
New Revision: 44364

Modified:
   pypy/dist/pypy/rpython/lltypesystem/rfficache.py
   pypy/dist/pypy/rpython/module/ll_os.py
Log:
Correct special casing of Windows platform


Modified: pypy/dist/pypy/rpython/lltypesystem/rfficache.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/rfficache.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/rfficache.py	Tue Jun 19 13:37:58 2007
@@ -5,7 +5,6 @@
 
 import py
 import os
-import sys
 from pypy.translator.tool.cbuild import build_executable
 from subprocess import PIPE, Popen
 from pypy.tool.udir import udir
@@ -47,7 +46,7 @@
     for name in (_name, 'unsigned ' + _name):
         TYPES.append(name)
 TYPES += ['long long', 'unsigned long long', 'size_t']
-if sys.platform != 'nt':
+if os.name != 'nt':
     TYPES.append('mode_t')
 
 def newline_repr(d):

Modified: pypy/dist/pypy/rpython/module/ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os.py	(original)
+++ pypy/dist/pypy/rpython/module/ll_os.py	Tue Jun 19 13:37:58 2007
@@ -19,7 +19,6 @@
 # 'suggested_primitive' flag is set to another function, if the conversion
 # and buffer preparation stuff is not useful.
 
-import sys
 import os
 from pypy.rpython.module.support import ll_strcpy, _ll_strfill
 from pypy.rpython.module.support import to_opaque_object, from_opaque_object
@@ -118,7 +117,7 @@
     path = rffi.charp2str(l_path)
     return os.open(path, flags, mode)
 
-if sys.platform == 'nt':
+if os.name == 'nt':
     mode_t = lltype.Signed
 else:
     mode_t = rffi.MODE_T


More information about the pypy-svn mailing list