summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-02-11 16:01:10 (GMT)
committerGitHub <noreply@github.com>2022-02-11 16:01:10 (GMT)
commite0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b (patch)
treeac91009aa5e26c8eccd7ddd1d19a7616b9968c40 /Python
parent4f9386661d51b78348395e78710f3bfbee9fd1de (diff)
downloadcpython-e0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b.zip
cpython-e0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b.tar.gz
cpython-e0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b.tar.bz2
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.
Diffstat (limited to 'Python')
-rw-r--r--Python/specialize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index e610a2d..1259a3c 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -1939,7 +1939,7 @@ int
if (PyAsyncGen_CheckExact(iter)) {
return SPEC_FAIL_FOR_ITER_ASYNC_GENERATOR;
}
- PyTypeObject *t = _Py_TYPE(iter);
+ PyTypeObject *t = Py_TYPE(iter);
if (t == &PyListIter_Type) {
return SPEC_FAIL_FOR_ITER_LIST;
}