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

pedronis at codespeak.net pedronis at codespeak.net
Sat Jun 16 16:53:49 CEST 2007


Author: pedronis
Date: Sat Jun 16 16:53:49 2007
New Revision: 44308

Modified:
   pypy/dist/pypy/rpython/lltypesystem/typecache.py
   pypy/dist/pypy/rpython/module/ll_os.py
Log:
mode_t may not be a signed



Modified: pypy/dist/pypy/rpython/lltypesystem/typecache.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/typecache.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/typecache.py	Sat Jun 16 16:53:49 2007
@@ -1,4 +1,5 @@
 # this is automatically generated cache files for c types
 platforms = {
-('', ('32bit', 'ELF'), 'Linux'):{'short': 16, 'int': 32, 'unsigned char': 8, 'long': 32, 'char': 8, 'unsigned short': 16, 'unsigned long': 32, 'long long': 64, 'mode_t': 32, 'unsigned long long': 64, 'size_t': 32, 'unsigned int': 32}
+('', ('32bit', 'ELF'), 'Linux'):{'short': 16, 'int': 32, 'unsigned char': 8, 'long': 32, 'char': 8, 'unsigned short': 16, 'unsigned long': 32, 'long long': 64, 'mode_t': 32, 'unsigned long long': 64, 'size_t': 32, 'unsigned int': 32},
+('i386', ('32bit', ''), 'Darwin'):{'short': 16, 'int': 32, 'unsigned char': 8, 'long': 32, 'char': 8, 'unsigned short': 16, 'unsigned long': 32, 'long long': 64, 'mode_t': 16, 'unsigned long long': 64, 'size_t': 32, 'unsigned int': 32}
 }

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	Sat Jun 16 16:53:49 2007
@@ -121,6 +121,7 @@
 
 def os_open_lltypeimpl(path, flags, mode):
     l_path = rffi.str2charp(path)
+    mode = lltype.cast_primitive(rffi.MODE_T, mode)
     result = os_open(l_path, flags, mode)
     lltype.free(l_path, flavor='raw')
     if result == -1:



More information about the Pypy-commit mailing list