Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-127787: allow to retrieved the clipped slice length in _PyUnicodeError_GetParams #128980

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Jan 18, 2025

I've taken the liberty of adding some assert_* functions just to be always sure that we don't mess up the indices. It's more for the future than for now since the assertions are simple. But I also felt that it'd be nicer to have a function call rather than lots of assert() one after the other.

I also removed some inline qualifiers as they are likely no more inlined (since we are calling an inline function with more than 1 or 2 lines more than once in the same function, I think it's better to let the compiler decide on the inlining itself).

@picnixz picnixz requested a review from encukou January 20, 2025 17:50
Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

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

Looks perfect now! :)
Thank you!

@encukou encukou merged commit 36f341c into python:main Jan 21, 2025
44 checks passed
@picnixz picnixz deleted the feat/exc/unicode-get-params-127787 branch January 21, 2025 10:51
@picnixz
Copy link
Member Author

picnixz commented Jan 21, 2025

You're welcome! Now I can finally do what I wanted to do in the first place (namely fixing the codecs handlers!!)

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