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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user