diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst index c76cc2f70ecccf..d902959570477b 100644 --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@ -303,6 +303,18 @@ complete listing. PyDoc_VAR(python_doc) = PyDoc_STR("A genus of constricting snakes in the Pythonidae family native " "to the tropics and subtropics of the Eastern Hemisphere."); +.. c:macro:: Py_ARRAY_LENGTH(array) + + Compute the length (number of elements) of a statically allocated C array at + compile time. + + The *array* argument must be a C array with a size known at compile time, + not a pointer. Using this macro with a pointer will produce incorrect results. + + This is generally equivalent to:: + + sizeof(array) / sizeof((array)[0]) + .. _api-objects: diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 58dd915e04f619..621bf938895a9c 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -730,6 +730,8 @@ Macro name C type Python type Always ``None``. Must be used with :c:macro:`Py_READONLY`. + + Defining Getters and Setters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Misc/mypy/_colorize.py b/Misc/mypy/_colorize.py index 9b7304769ec30b..5d2723595daa8d 120000 --- a/Misc/mypy/_colorize.py +++ b/Misc/mypy/_colorize.py @@ -1 +1 @@ -../../Lib/_colorize.py \ No newline at end of file +../../Lib/_colorize.py diff --git a/Misc/mypy/token.py b/Misc/mypy/token.py index 0a39f726dda1aa..9f38e9c897fb0c 120000 --- a/Misc/mypy/token.py +++ b/Misc/mypy/token.py @@ -1 +1 @@ -../../Lib/token.py \ No newline at end of file +../../Lib/token.py