Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Dec 18, 2024

Convert unicodeobject.c macros to static inline functions.

  • Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros.
  • Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros.
  • Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.

Convert unicodeobject.c macros to static inline functions.

* Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros.
* Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros.
* Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.
Copy link
Contributor

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a one nitpick.

@vstinner vstinner merged commit f802c8b into python:main Dec 18, 2024
43 checks passed
@vstinner vstinner deleted the unicode_static_inline branch December 18, 2024 15:34
kumaraditya303 pushed a commit to kumaraditya303/cpython that referenced this pull request Jan 2, 2025
…128061)

Convert unicodeobject.c macros to static inline functions.

* Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros.
* Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros.
* Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
…128061)

Convert unicodeobject.c macros to static inline functions.

* Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros.
* Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros.
* Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants