FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-124502: Remove _PyUnicode_EQ() function by vstinner · Pull Request #125114 · python/cpython · GitHub

/ cpython Public

gh-124502: Remove _PyUnicode_EQ() function - #125114

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:remove_unicode_eq
Oct 9, 2024
Merged

gh-124502: Remove _PyUnicode_EQ() function#125114
vstinner merged 2 commits into
python:mainfrom
vstinner:remove_unicode_eq

Conversation

vstinner commented Oct 8, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member
  • Replace unicode_compare_eq() with unicode_eq().
  • Replace _PyUnicode_EQ() with _PyUnicode_Equal().
  • Remove unicode_compare_eq() and _PyUnicode_EQ().

* Replace unicode_compare_eq() with unicode_eq().
* Replace _PyUnicode_EQ() with _PyUnicode_Equal().
* Remove unicode_compare_eq() and _PyUnicode_EQ().

vstinner commented Oct 8, 2024

Copy link
Copy Markdown
Member Author

For setobject.c, I decided to reuse unicode_eq() of Objects/stringlib/eq.h instead of _PyUnicode_Equal(), because _PyUnicode_Equal() repeats str1 == str2 test which is already done by setobject.c.

dictobject.c also uses unicode_eq() of Objects/stringlib/eq.h for a similar reason (and for best performance, I suppose).

vstinner commented Oct 8, 2024

Copy link
Copy Markdown
Member Author

cc @serhiy-storchaka

vstinner merged commit e0c87c6 into python:main Oct 9, 2024
vstinner deleted the remove_unicode_eq branch October 9, 2024 08:15

vstinner commented Oct 9, 2024

Copy link
Copy Markdown
Member Author

Merged, thanks for the review @serhiy-storchaka.

efimov-mikhail pushed a commit to efimov-mikhail/cpython that referenced this pull request Oct 9, 2024
* Replace unicode_compare_eq() with unicode_eq().
* Use unicode_eq() in setobject.c.
* Replace _PyUnicode_EQ() with _PyUnicode_Equal().
* Remove unicode_compare_eq() and _PyUnicode_EQ().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL