[pypy-commit] cffi default: Try to make it clearer.
arigo
noreply at buildbot.pypy.org
Wed Sep 19 15:03:04 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r947:1a98013c2393
Date: 2012-09-19 15:02 +0200
http://bitbucket.org/cffi/cffi/changeset/1a98013c2393/
Log: Try to make it clearer.
diff --git a/doc/source/index.rst b/doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1029,7 +1029,10 @@
``ffi.gc(cdata, destructor)``: return a new cdata object that points to the
same data. Later, when this new cdata object is garbage-collected,
``destructor(old_cdata_object)`` will be called. Example of usage:
-``ptr = ffi.gc(lib.malloc(42), lib.free)``. *New in version 0.3* (together
+``ptr = ffi.gc(lib.malloc(42), lib.free)``. Note that like objects
+returned by ``ffi.new()``, the returned pointer objects have *ownership*,
+which means the destructor is called as soon as *this* exact returned
+object is garbage-collected. *New in version 0.3* (together
with the fact that any cdata object can be weakly referenced).
.. "versionadded:: 0.3" --- inlined in the previous paragraph
More information about the pypy-commit
mailing list