Skip to content

Remove redundant operations from zend_llist_clean() #19143

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 1 commit into from
Jul 16, 2025

Conversation

nielsdos
Copy link
Member

This function calls zend_llist_destroy() which already sets the head and tail pointers since c732ab4.

This function calls zend_llist_destroy() which already sets the head and
tail pointers since c732ab4.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

As so one is basically an alias for the other since that commit

@@ -121,7 +121,6 @@ ZEND_API void zend_llist_destroy(zend_llist *l)
ZEND_API void zend_llist_clean(zend_llist *l)
Copy link
Member

Choose a reason for hiding this comment

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

I've had a long-standard todo to just remove this function since it does the same as the _destroy version, and this just makes it clearer - is there a reason not to remove it now?

Copy link
Member Author

Choose a reason for hiding this comment

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

More code churn for third party extensions.

@nielsdos nielsdos merged commit 484d435 into php:master Jul 16, 2025
9 checks passed
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.

3 participants