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

[stdlib] Refactor atol: StringRef to StringSlice and reusability #3207

Open
wants to merge 1 commit into
base: nightly
Choose a base branch
from

Conversation

jjvraw
Copy link
Contributor

@jjvraw jjvraw commented Jul 9, 2024

This pull request modularises previously inline code, assisting in addressing issue #2639 to allow stol function to reuse some of the functionality. These changes, initially part of PR #3178, have been separated for easier review.

The refactoring extracts _handle_base_prefix & _trim_and_handle_sign. Additionally, the docstring has been revised for clarity.

Alongside these changes, the respective function signatures have been updated to move away from StringRef to StringSlice.

There was also a small FIXME to convert from var to alias, which is now seems possible.

@jjvraw jjvraw requested a review from a team as a code owner July 9, 2024 21:21
@jjvraw jjvraw marked this pull request as draft July 12, 2024 15:16
@jjvraw jjvraw changed the title [stdlib] Refactor atol for reusability [stdlib] Refactor atol: StringRef to StringSlice and reusability Jul 13, 2024
@jjvraw jjvraw force-pushed the refact/atol branch 3 times, most recently from 5b8b424 to 05740d2 Compare July 18, 2024 12:02
@jjvraw jjvraw marked this pull request as ready for review July 18, 2024 12:09
@jjvraw
Copy link
Contributor Author

jjvraw commented Jul 18, 2024

Sorry for the ping, @JoeLoser, but since you recently reviewed atol in #3180, perhaps you could review this as well? The idea is to refactor this for the introduction of stol as per issue #2639. I'll then merge PR #3178 with these changes and make the appropriate changes :)

If not, no problem!

@jjvraw jjvraw changed the title [stdlib] Refactor atol: StringRef to StringSlice and reusability [stdlib] Refactor atol: StringRef to StringSlice and reusability Jul 24, 2024
@JoeLoser JoeLoser self-assigned this Aug 19, 2024
- StringRef to StringSlice
- Introduce _handle_base_prefix & _trim_and_handle_sign
- Changed var to alias

Signed-off-by: Joshua James Venter <venter.joshua@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants