Author: Edd Barrett <[email protected]>
Branch: asmmemmgr-for-code-only
Changeset: r86822:f777170ec79b
Date: 2016-09-01 17:00 +0100
http://bitbucket.org/pypy/pypy/changeset/f777170ec79b/
Log: Fix translation.
diff --git a/rpython/rlib/rmmap.py b/rpython/rlib/rmmap.py
--- a/rpython/rlib/rmmap.py
+++ b/rpython/rlib/rmmap.py
@@ -746,20 +746,20 @@
def set_pages_executable(addr, size):
assert lltype.typeOf(addr) == rffi.CCHARP
assert isinstance(size, int)
- #assert size >= 0
rv = mprotect(addr, size, PROT_EXEC | PROT_READ)
if int(rv) < 0:
from rpython.rlib import debug
debug.fatalerror_notb("set_pages_executable failed")
+ set_pages_executable._annenforceargs_ = (None, int)
def set_pages_writable(addr, size):
assert lltype.typeOf(addr) == rffi.CCHARP
assert isinstance(size, int)
- #assert size >= 0
rv = mprotect(addr, size, PROT_WRITE | PROT_READ)
if int(rv) < 0:
from rpython.rlib import debug
debug.fatalerror_notb("set_pages_writable failed")
+ set_pages_writable._annenforceargs_ = (None, int)
def clear_large_memory_chunk_aligned(addr, map_size):
addr = rffi.cast(PTR, addr)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit