]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45490: Rename static inline functions (GH-31217)
authorVictor Stinner <vstinner@python.org>
Fri, 11 Feb 2022 16:01:10 +0000 (17:01 +0100)
committerGitHub <noreply@github.com>
Fri, 11 Feb 2022 16:01:10 +0000 (17:01 +0100)
commite0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b
treeac91009aa5e26c8eccd7ddd1d19a7616b9968c40
parent4f9386661d51b78348395e78710f3bfbee9fd1de
bpo-45490: Rename static inline functions (GH-31217)

When a static inline function is wrapped by a macro which casts its
arguments to the expected type, there is no need that the function
has a different name than the macro. Use the same name for the macro
and the function to avoid confusion.

Rename _PyUnicode_get_wstr_length() to PyUnicode_WSTR_LENGTH().

Don't rename static inline _Py_NewRef() and _Py_XNewRef() functions,
since the C API exports Py_NewRef() and Py_XNewRef() functions as
regular functions. The name cannot be reused in this case.
Include/cpython/unicodeobject.h
Include/object.h
Python/specialize.c