Skip to content

Use size_t to store heaps count #19482

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
Aug 15, 2025
Merged

Conversation

alexandre-daubois
Copy link
Member

After #19447 (comment)

I chose size_t over other alternatives because spl_heap_elem() already uses size_t for its index param, and heap's max size also uses this type.

@alexandre-daubois alexandre-daubois marked this pull request as ready for review August 14, 2025 14:19
@TimWolla
Copy link
Member

This is just small-scale internal cleanup of non-exported stuff, thus not requesting RM approval.

@TimWolla TimWolla merged commit e5f81bd into php:master Aug 15, 2025
15 of 16 checks passed
@bukka
Copy link
Member

bukka commented Aug 15, 2025

@TimWolla I think you should be getting RM approval for any feature in beta by https://github.com/php/policies/blob/main/release-process.rst#beta-releases and RM should decide if it's small enough.

@bukka
Copy link
Member

bukka commented Aug 15, 2025

Thinking about it I think we should maybe rather update policy as it really doesn't make sense for those smaller features to require RM approval

@bukka
Copy link
Member

bukka commented Aug 15, 2025

But it's hard to say where draw the line because some huge refactorings should be probably considered as they might potentially introduce bugs and destabilize release.

@TimWolla
Copy link
Member

@bukka I consider this one to be more of a bugfix than a feature. It does not affect the public API and fixes some type- and signedness-mismatches (passing int to size_t and comparing int to size_t).

If this would've affected a header file, I would've requested review.

@bukka
Copy link
Member

bukka commented Aug 15, 2025

That makes sense

@iluuu1994
Copy link
Member

That document also doesn't clarify whether a change must be user-facing to be considered a feature. Or, if this is extended to internal code, whether it applies only to the API. IMO, it makes little sense to apply it to refactorings that don't change APIs, as those can always be reverted without any consequences to 3rd parties. Once we've branched master, it makes sense for new refactorings to go to the new master, so that we don't accidentally break things during the last testing phase(s) of the new release.

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.

5 participants