Skip to content
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

ext/standard/array.c: Minor clean-up refactoring #15884

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Sep 14, 2024

No description provided.

Copy link
Member

@arnaud-lb arnaud-lb left a comment

Choose a reason for hiding this comment

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

LGTM!

bool length_is_null = 1;
int num_in; /* Number of elements in the input array */
bool length_is_null = true;
uint32_t num_in; /* Number of elements in the input array */
Copy link
Member

Choose a reason for hiding this comment

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

This makes the cast at line 3809 redundant

@@ -6742,7 +6728,7 @@ PHP_FUNCTION(array_all)
PHP_FUNCTION(array_map)
{
zval *arrays = NULL;
int n_arrays = 0;
uint32_t n_arrays = 0;
Copy link
Member

Choose a reason for hiding this comment

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

i may be a uint32_t as well

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