[pypy-svn] r31407 - pypy/dist/pypy/module/mmap

rhymes at codespeak.net rhymes at codespeak.net
Sat Aug 19 16:45:43 CEST 2006


Author: rhymes
Date: Sat Aug 19 16:45:42 2006
New Revision: 31407

Modified:
   pypy/dist/pypy/module/mmap/interp_mmap.py
Log:
specify params as the right type

Modified: pypy/dist/pypy/module/mmap/interp_mmap.py
==============================================================================
--- pypy/dist/pypy/module/mmap/interp_mmap.py	(original)
+++ pypy/dist/pypy/module/mmap/interp_mmap.py	Sat Aug 19 16:45:42 2006
@@ -623,14 +623,10 @@
             space.wrap("memory mapped size is too large (limited by C int)"))
 
 if _POSIX:
-    def mmap(space, w_fileno, w_length, flags=MAP_SHARED,
+    def mmap(space, fileno, length, flags=MAP_SHARED,
         prot=PROT_WRITE | PROT_READ, access=_ACCESS_DEFAULT):
-        # flags = MAP_SHARED
-        # prot = PROT_WRITE | PROT_READ
-        # access = _ACCESS_DEFAULT
 
-        fd = space.int_w(w_fileno)
-        length = space.int_w(w_length)
+        fd = fileno
 
         # check size boundaries
         _check_map_size(space, length)
@@ -697,7 +693,7 @@
         m._access = access
 
         return space.wrap(m)
-    mmap.unwrap_spec = [ObjSpace, W_Root, W_Root, int, int, int]
+    mmap.unwrap_spec = [ObjSpace, int, int, int, int, int]
 # elif _MS_WINDOWS:
 #     def mmap(fileno, length, *args, **kwargs):
 #         size_hi = wintypes.DWORD() # upper 32 bits of m._size



More information about the Pypy-commit mailing list