bpo-45116: Py_DEBUG ignores Py_ALWAYS_INLINE (GH-28419)

If the Py_DEBUG macro is defined, the Py_ALWAYS_INLINE macro does
nothing.
This commit is contained in:
Victor Stinner 2021-09-17 22:46:38 +02:00 committed by GitHub
parent 51ebb7f4f5
commit e4044e9f89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -124,6 +124,9 @@ complete listing.
worse performances (due to increased code size for example). The compiler is
usually smarter than the developer for the cost/benefit analysis.
If Python is :ref:`built in debug mode <debug-build>` (if the ``Py_DEBUG``
macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does nothing.
It must be specified before the function return type. Usage::
static inline Py_ALWAYS_INLINE int random(void) { return 4; }