-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Refactor pchar_parse() to use switch() #10398
Conversation
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
13 similar comments
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Jenkins: this is ok to test |
(c == '!' || c == '$' || c == '&' || c == '\'' || c == '$' || c == '&' || | ||
c == '(' || c == ')' || c == '*' || c == '+' || c == ',' || c == ';' || | ||
c == '=') /* sub-delims */) { | ||
(c == '!' || c == '$' || c == '&' || c == '\'' || |
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.
This is begging to be converted to a switch..
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.
or some form of LUT
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.
Yes, agree. I will work on it. Should I create new pull request for that?
|
Could you run tools/distrib/clang-format-code.sh against this and push an update? The formatting is off compared to what our tooling expects. (you'll need docker installed) |
Sorry about formatting. Fixed. |
|
Feel free to amend this one... No need for a new pull request
…On Sat, Apr 1, 2017, 1:48 AM Igor Pylypiv ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/core/ext/client_channel/uri_parser.c
<#10398 (comment)>:
> @@ -96,9 +96,9 @@ static size_t parse_pchar(const char *uri_text, size_t i) {
if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')) ||
((c >= '0') && (c <= '9')) ||
(c == '-' || c == '.' || c == '_' || c == '~') || /* unreserved */
- (c == '!' || c == '$' || c == '&' || c == '\'' || c == '$' || c == '&' ||
- c == '(' || c == ')' || c == '*' || c == '+' || c == ',' || c == ';' ||
- c == '=') /* sub-delims */) {
+ (c == '!' || c == '$' || c == '&' || c == '\'' ||
Yes, agree. I will work on it. Should I create new pull request for that?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#10398 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJpudfC6IpmU0CSFFSBQ2ehY_2oUHeaJks5rrg92gaJpZM4MvQWM>
.
|
During refactoring I have found few issues:
Question: Would be one additional check: |
|
I am investigating why test failed, and will update my commit to fix that. |
|
1 similar comment
|
This looks good: can you merge with head (the file moved) - and re-run clang-format? |
Sure, I will merge it. What about
|
Add previously missed '@' and ':' characters
|
We use slices throughout for these things, and I think we have a use case down the line for nulls (anonymous uds sockets on Linux) -- unless there's a better standard representation of these. |
Jenkins: test this please |
|
I don't correlate latest build failures with my change. Do I need to do something else here? |
Comparisons
c == '$'
andc == '&'
are present two times inside if statement.