Author: Armin Rigo <[email protected]>
Branch:
Changeset: r3332:459f86e1d944
Date: 2020-01-31 06:20 +0100
http://bitbucket.org/cffi/cffi/changeset/459f86e1d944/
Log: The point of this example is that it doesn't work with a variable,
only with a constant number. So don't use `n`.
diff --git a/doc/source/ref.rst b/doc/source/ref.rst
--- a/doc/source/ref.rst
+++ b/doc/source/ref.rst
@@ -37,7 +37,7 @@
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
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit