[pypy-svn] pypy default: Add _annenforceargs_.
arigo
commits-noreply at bitbucket.org
Tue Mar 15 21:54:14 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r42685:e5852ab46bbb
Date: 2011-03-15 16:53 -0400
http://bitbucket.org/pypy/pypy/changeset/e5852ab46bbb/
Log: Add _annenforceargs_.
diff --git a/pypy/rpython/lltypesystem/rffi.py b/pypy/rpython/lltypesystem/rffi.py
--- a/pypy/rpython/lltypesystem/rffi.py
+++ b/pypy/rpython/lltypesystem/rffi.py
@@ -648,6 +648,7 @@
data_start = cast_ptr_to_adr(llstrtype(data)) + \
offsetof(STRTYPE, 'chars') + itemoffsetof(STRTYPE.chars, 0)
return cast(TYPEP, data_start)
+ get_nonmovingbuffer._annenforceargs_ = [strtype]
# (str, char*) -> None
def free_nonmovingbuffer(data, buf):
@@ -666,6 +667,7 @@
keepalive_until_here(data)
if not followed_2nd_path:
lltype.free(buf, flavor='raw')
+ free_nonmovingbuffer._annenforceargs_ = [strtype, None]
# int -> (char*, str)
def alloc_buffer(count):
More information about the Pypy-commit
mailing list