Skip to content

Commit

Permalink
Update documentation to suggest "pointer[int]" over "pointer(int)".
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed Sep 24, 2024
1 parent c705eec commit f70f49c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/tutorial/pure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ as well as their unsigned versions ``uchar``, ``ushort``, ``uint``, ``ulong``,

For each type, there are pointer types ``p_int``, ``pp_int``, etc., up to
three levels deep in interpreted mode, and infinitely deep in compiled mode.
Further pointer types can be constructed with ``cython.pointer(cython.int)``,
Further pointer types can be constructed with ``cython.pointer[cython.int]``
(or ``cython.pointer(cython.int)`` for compatibility with Cython versions before 3.1),
and arrays as ``cython.int[10]``. A limited attempt is made to emulate these
more complex types, but only so much can be done from the Python language.

Expand Down Expand Up @@ -222,7 +223,7 @@ Managing the Global Interpreter Lock
@cython.cfunc
def func_released_gil() -> cython.int:
# function that can be run with the GIL released

Note that the two uses differ: the context manager releases the GIL while the decorator marks that a
function *can* be run without the GIL. See :ref:`cython_and_gil` for more details.

Expand Down

0 comments on commit f70f49c

Please sign in to comment.