Author: Gregor Wegberg <[email protected]>
Branch: gc-incminimark-pinning
Changeset: r73318:19a470acba00
Date: 2014-09-05 11:37 +0200
http://bitbucket.org/pypy/pypy/changeset/19a470acba00/
Log: Merge heads
diff --git a/rpython/rtyper/lltypesystem/rffi.py
b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -763,14 +763,13 @@
"""
Either returns a non-moving copy or performs neccessary pointer
arithmetic to return a pointer to the characters of a string if the
- string is already nonmovable. Must be followed by a
+ string is already nonmovable or could be pinned. Must be followed by a
free_nonmovingbuffer call.
First bool returned indicates if 'data' was pinned. Second bool
returned
- indicates if we did a raw alloc because pinning didn't work. Bot bools
+ indicates if we did a raw alloc because pinning failed. Both bools
should never be true at the same time.
"""
- # XXX update doc string
lldata = llstrtype(data)
count = len(data)
@@ -801,7 +800,8 @@
@jit.dont_look_inside
def free_nonmovingbuffer(data, buf, is_pinned, is_raw):
"""
- Either free a non-moving buffer or keep the original storage alive.
+ Keep 'data' alive and unpin it if it was pinned ('is_pinned' is true).
+ Otherwise free the non-moving copy ('is_raw' is true).
"""
if is_pinned:
rgc.unpin(data)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit