Skip to content

Prevent unnecessary string duplication in assert() #11031

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

Merged
merged 2 commits into from
May 7, 2023

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Apr 7, 2023

This prevents recomputing the length of the string that we already know and duplicating memory.

@Girgias Girgias force-pushed the assert-refactoring branch from 7066742 to 8eccf87 Compare May 6, 2023 12:51
@Girgias Girgias requested a review from bukka as a code owner May 6, 2023 12:51
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

I think this is OK now.

@Girgias Girgias merged commit 1820c42 into php:master May 7, 2023
@Girgias Girgias deleted the assert-refactoring branch May 7, 2023 14:00
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