1. Python CFFI
  2. Untitled project
  3. cffi


Armin Rigo  committed 3614850

An extra pair of lines in the documentation

  • Participants
  • Parent commits 96939e9
  • Branches default

Comments (0)

Files changed (1)

File doc/source/index.rst

View file
  • Ignore whitespace
 can pass it around to C functions or store it into C structures.  Later,
 you can use ``ffi.from_handle(p)`` to retrive the original
 ``python_object`` from a value with the same ``void *`` pointer.  The
+cdata object returned by ``new_handle()`` must be kept alive (and, in
+turn, it keeps alive the ``python_object`` too).  In other words, the
 cdata object returned by ``new_handle()`` has *ownership*, in the same
 sense as ``ffi.new()`` or ``ffi.gc()``: the association ``void * ->
 python_object`` is only valid as long as *this* exact cdata returned by