File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,18 @@ complete listing.
303303 PyDoc_VAR(python_doc) = PyDoc_STR("A genus of constricting snakes in the Pythonidae family native "
304304 "to the tropics and subtropics of the Eastern Hemisphere.");
305305
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+
316+ sizeof(array) / sizeof((array)[0])
317+
306318
307319.. _api-objects :
308320
Original file line number Diff line number Diff line change @@ -730,20 +730,7 @@ Macro name C type Python type
730730
731731 Always ``None ``. Must be used with :c:macro: `Py_READONLY `.
732732
733- .. c :macro :: Py_ARRAY_LENGTH(array)
734-
735- Compute the length (number of elements) of a statically allocated C array at
736- compile time.
737-
738- The *array * argument must be a C array with a size known at compile time,
739- not a pointer. Using this macro with a pointer will produce incorrect results.
740-
741- This macro is defined as::
742-
743- #define Py_ARRAY_LENGTH(array) (sizeof(array) / sizeof((array)[0]))
744-
745- .. versionadded :: 3.13
746-
733+
747734
748735Defining Getters and Setters
749736^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments