Commit db11af51 authored by scoder's avatar scoder Committed by GitHub

Merge pull request #2244 from gabrieldemarmiesse/doc_vla

Clarified cython's capabilities about C99's VLA.
parents 612363c7 543ebf74
...@@ -77,8 +77,9 @@ containers. ...@@ -77,8 +77,9 @@ containers.
Pointer types are constructed as in C, by appending a ``*`` to the base type Pointer types are constructed as in C, by appending a ``*`` to the base type
they point to, e.g. ``int**`` for a pointer to a pointer to a C int. they point to, e.g. ``int**`` for a pointer to a pointer to a C int.
Arrays use the normal C array syntax, e.g. ``int[10]``. Note that Cython uses Arrays use the normal C array syntax, e.g. ``int[10]``, and the size must be known
array access for pointer dereferencing, as ``*x`` is not valid Python syntax, at compile time for stack allocated arrays. Cython doesn't support variable length arrays from C99.
Note that Cython uses array access for pointer dereferencing, as ``*x`` is not valid Python syntax,
whereas ``x[0]`` is. whereas ``x[0]`` is.
Also, the Python types ``list``, ``dict``, ``tuple``, etc. may be used for Also, the Python types ``list``, ``dict``, ``tuple``, etc. may be used for
......
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