-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
18ea840
to
30e2798
Compare
a877fba
to
758bf5f
Compare
This is just small-scale internal cleanup of non-exported stuff, thus not requesting RM approval. |
@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. |
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 |
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. |
@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. |
That makes sense |
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. |
After #19447 (comment)
I chose
size_t
over other alternatives becausespl_heap_elem()
already usessize_t
for its index param, and heap's max size also uses this type.