Commit afdae759 authored by Stefan Behnel's avatar Stefan Behnel

clarify 'with gil' signature in C code wrapping docs

--HG--
extra : transplant_source : %C6%5B%E6p%A8%07V%04%CC%8D%EB%12%BB%A2%87%B5%D3%9A%F0%60
parent 50aa394d
......@@ -459,7 +459,7 @@ Acquiring the GIL
A C function that is to be used as a callback from C code that is executed
without the GIL needs to acquire the GIL before it can manipulate Python
objects. This can be done by specifying with :keyword:`gil` in the function
objects. This can be done by specifying ``with gil`` in the function
header::
cdef void my_callback(void *data) with gil:
......@@ -494,6 +494,5 @@ performed in the future.
.. NOTE:: This declaration declares that it is safe to call the function without the GIL,
it does not in itself release the GIL.
Declaring a function with :keyword:`gil` also implicitly makes its signature
:keyword:`nogil`.
Declaring a function ``with gil`` (i.e. as acquiring the GIL on entry) also
implicitly makes its signature :keyword:`nogil`.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment