| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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.
Sorry, something went wrong.
|
Hm, this does look a bit better at first glance. Are there any downsides? |
Sorry, something went wrong.
I'm not aware of any downside. |
Sorry, something went wrong.
There was a problem hiding this comment.
I'm fine with this change.
Sorry, something went wrong.
|
Merged, thanks for the review @erlend-aasland. More background on why I chose a different name initially and why I want to change it now: https://mail.python.org/archives/list/python-dev@python.org/message/XOLV4BVJDZH3RJRLV3UKDYKA664IANZO/ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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.
https://bugs.python.org/issue45490