-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/standard/pack: minor refactoring #18822
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
They serve no purpose and are just confusing
And use char instead of widening to int for no reason
ext/standard/pack.c
Outdated
@@ -380,10 +360,10 @@ PHP_FUNCTION(pack) | |||
|
|||
/* Calculate output length and upper bound while processing*/ | |||
for (i = 0; i < formatcount; i++) { | |||
int code = (int) formatcodes[i]; | |||
char code = formatcodes[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contains leading spaces while the rest of the file uses tab
ext/standard/pack.c
Outdated
@@ -463,10 +443,10 @@ PHP_FUNCTION(pack) | |||
|
|||
/* Do actual packing */ | |||
for (i = 0; i < formatcount; i++) { | |||
int code = (int) formatcodes[i]; | |||
char code = formatcodes[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contains leading spaces while the rest of the file uses tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok besides nits from Markus
The nits were address in 95e77b9 :) |
No description provided.