diff options
| author | Armin Rigo <arigo@tunes.org> | 2016-01-14 10:13:39 +0100 |
|---|---|---|
| committer | Armin Rigo <arigo@tunes.org> | 2016-01-14 10:13:39 +0100 |
| commit | 2c8d91221ca84d371035c0b6ce13bc9810ef8940 (patch) | |
| tree | db046c70ab06e7c8a9843f437a776d9d63b6d6f2 /doc/source/using.rst | |
| parent | 0709ac930d99dfbcb8f5dfd89fff647d2de67368 (diff) | |
| download | cffi-2c8d91221ca84d371035c0b6ce13bc9810ef8940.tar.gz | |
Add some sections
Diffstat (limited to 'doc/source/using.rst')
| -rw-r--r-- | doc/source/using.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/source/using.rst b/doc/source/using.rst index ffc1f39..b673546 100644 --- a/doc/source/using.rst +++ b/doc/source/using.rst @@ -423,6 +423,7 @@ relying on compiler-specific extensions. Nowadays virtually all code with ``int foo();`` really means ``int foo(void);``.) +.. _extern-python: .. _`extern "Python"`: Extern "Python" (new-style callbacks) @@ -1069,12 +1070,13 @@ and ``__exit__()`` methods, allocating and freeing the C data at known points in time, and using it in a ``with`` statement. +.. _ffi-new_handle: .. _`ffi.new_handle()`: **ffi.new_handle(python_object)**: return a non-NULL cdata of type ``void *`` that contains an opaque reference to ``python_object``. You 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 +you can use **ffi.from_handle(p)** to retrieve the original ``python_object`` from a value with the same ``void *`` pointer. *Calling ffi.from_handle(p) is invalid and will likely crash if the cdata object returned by new_handle() is not kept alive!* |
