Skip to content

Use zend_result in ext/spl where appropriate #10734

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
Mar 1, 2023

Conversation

nielsdos
Copy link
Member

I checked ext/spl and I found some places where zend_result can be returned instead of int.

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Thank you @nielsdos!

Comment on lines +82 to +84
e. ext/spl
- The PHPAPI spl_iterator_apply() function now returns zend_result instead of int.
There are no functional changes.
Copy link
Member

Choose a reason for hiding this comment

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

If there are no functional changes, does this require a mention in the UPGRADING notes?

Copy link
Member Author

@nielsdos nielsdos Mar 1, 2023

Choose a reason for hiding this comment

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

I don't know. I thought it was best to document it since it seems to be a public API. If it shouldn't be documented I can drop this change.

Copy link
Member

Choose a reason for hiding this comment

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

Probably not since conversion from and to int is fine (without specific strict flags). But it doesn't really hurt either.

@iluuu1994 iluuu1994 merged commit 2b15061 into php:master Mar 1, 2023
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