Skip to content

Use proper hash_spec_result enum for return values in ext/hash #19386

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
Aug 9, 2025

Conversation

alexandre-daubois
Copy link
Member

ext/hash currently uses a mix of SUCCESS, FAILURE and custom return codes. I propose to remove these magic numbers, define an enum for the return type.

I also removed a few elses to reduce complexity.

@alexandre-daubois alexandre-daubois marked this pull request as draft August 6, 2025 07:02
@alexandre-daubois alexandre-daubois force-pushed the ext-hash-return branch 2 times, most recently from 4b8063f to 6b7915e Compare August 6, 2025 07:04
@alexandre-daubois alexandre-daubois marked this pull request as ready for review August 6, 2025 07:26
@iluuu1994 iluuu1994 requested a review from Girgias August 8, 2025 17:40
@Girgias Girgias requested review from nielsdos and removed request for Girgias August 8, 2025 20:17
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.

Thanks

@nielsdos nielsdos merged commit 74c006f into php:master Aug 9, 2025
8 of 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.

2 participants