Skip to content

Prevent unnecessary string duplication in assert()#11031

Merged
Girgias merged 2 commits into
php:masterfrom
Girgias:assert-refactoring
May 7, 2023
Merged

Prevent unnecessary string duplication in assert()#11031
Girgias merged 2 commits into
php:masterfrom
Girgias:assert-refactoring

Conversation

@Girgias

@Girgias Girgias commented Apr 7, 2023

Copy link
Copy Markdown
Member

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

Comment thread ext/standard/assert.c Outdated
@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

@ndossche ndossche left a comment

Copy link
Copy Markdown
Member

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