[pypy-svn] r77677 - pypy/branch/32ptr-on-64bit/pypy/rlib
arigo at codespeak.net
arigo at codespeak.net
Thu Oct 7 13:46:55 CEST 2010
Author: arigo
Date: Thu Oct 7 13:46:52 2010
New Revision: 77677
Modified:
pypy/branch/32ptr-on-64bit/pypy/rlib/rmmap.py
Log:
Add an _annenforcearg_.
Modified: pypy/branch/32ptr-on-64bit/pypy/rlib/rmmap.py
==============================================================================
--- pypy/branch/32ptr-on-64bit/pypy/rlib/rmmap.py (original)
+++ pypy/branch/32ptr-on-64bit/pypy/rlib/rmmap.py Thu Oct 7 13:46:52 2010
@@ -109,7 +109,7 @@
if _POSIX:
has_mremap = cConfig['has_mremap']
- c_mmap, c_mmap_safe = external('mmap', [PTR, size_t, rffi.INT, rffi.INT,
+ c_mmap, _c_mmap_safe = external('mmap', [PTR, size_t, rffi.INT, rffi.INT,
rffi.INT, off_t], PTR)
c_munmap, c_munmap_safe = external('munmap', [PTR, size_t], rffi.INT)
c_msync, _ = external('msync', [PTR, size_t, rffi.INT], rffi.INT)
@@ -117,7 +117,9 @@
c_mremap, _ = external('mremap',
[PTR, size_t, size_t, rffi.ULONG], PTR)
- c_mmap_safe._annenforceargs_ = (None, int, int, int, int, int)
+ def c_mmap_safe(addr, length, prot, flags, fd, offset):
+ return _c_mmap_safe(addr, length, prot, flags, fd, offset)
+ c_mmap_safe._annenforceargs_ = (PTR, int, int, int, int, int)
# this one is always safe
_, _get_page_size = external('getpagesize', [], rffi.INT)
More information about the Pypy-commit
mailing list