summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2020-01-31 06:20:58 +0100
committerArmin Rigo <arigo@tunes.org>2020-01-31 06:20:58 +0100
commit852666064108f597d0c17d8ef5fa90e8b091bf32 (patch)
tree3fc879b3024e8680a42928263894512853e74ab3 /doc
parent2de39b6a205ef1c9db682233ff880ad4ed749097 (diff)
downloadcffi-852666064108f597d0c17d8ef5fa90e8b091bf32.tar.gz
The point of this example is that it doesn't work with a variable, only with a
constant number. So don't use `n`.
Diffstat (limited to 'doc')
-rw-r--r--doc/source/ref.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/source/ref.rst b/doc/source/ref.rst
index df03b6f..9aaed7a 100644
--- a/doc/source/ref.rst
+++ b/doc/source/ref.rst
@@ -37,7 +37,7 @@ ffi.new()
allocate an instance according to the specified C type and return a
pointer to it. The specified C type must be either a pointer or an
array: ``new('X *')`` allocates an X and returns a pointer to it,
-whereas ``new('X[n]')`` allocates an array of n X'es and returns an
+whereas ``new('X[10]')`` allocates an array of 10 X'es and returns an
array referencing it (which works mostly like a pointer, like in C).
You can also use ``new('X[]', n)`` to allocate an array of a
non-constant length n. See the `detailed documentation`__ for other