mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
4f9386661d
commit
e0bcfd0e4d
3 changed files with 32 additions and 32 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue