We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85f3009 commit 7c24a14Copy full SHA for 7c24a14
Doc/c-api/intro.rst
@@ -303,6 +303,16 @@ complete listing.
303
PyDoc_VAR(python_doc) = PyDoc_STR("A genus of constricting snakes in the Pythonidae family native "
304
"to the tropics and subtropics of the Eastern Hemisphere.");
305
306
+.. c:macro:: Py_ARRAY_LENGTH(array)
307
+
308
+ Compute the length (number of elements) of a statically allocated C array at
309
+ compile time.
310
311
+ The *array* argument must be a C array with a size known at compile time,
312
+ not a pointer. Using this macro with a pointer will produce incorrect results.
313
314
+ This is generally equivalent to::
315
+ sizeof(array) / sizeof((array)[0])
316
317
.. _api-objects:
318
0 commit comments