-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[stdlib] [NFC] Replace _strnlen
with _unsafe_strlen(ptr, max: UInt = UInt.MAX)
#4306
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
[stdlib] [NFC] Replace _strnlen
with _unsafe_strlen(ptr, max: UInt = UInt.MAX)
#4306
Conversation
7726c53
to
ffe9887
Compare
2062d66
to
9406f11
Compare
becf5ec
to
f46c599
Compare
I suggest removing the |
f46c599
to
260acf2
Compare
_strnlen
to string_slice.mojo
and make _unsafe_strlen
a bit safer_strnlen
with _unsafe_strlen(ptr, max: UInt = UInt.MAX)
b0f717e
to
1de496f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is unifying two functions into one and generally makes the codebase better. The rename doesn't seem to be high-impact. LGTM!
You will need to rebase; there are a few small merge conflicts.
Signed-off-by: martinvuyk <[email protected]>
1de496f
to
e3425d7
Compare
!sync |
✅🟣 This contribution has been merged 🟣✅ Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the main branch during the next Mojo nightly release, typically within the next 24-48 hours. We use Copybara to merge external contributions, click here to learn more. |
Landed in b1378c8! Thank you for your contribution 🎉 |
Replace
_strnlen
with_unsafe_strlen(ptr, max: UInt = UInt.MAX)