-
Notifications
You must be signed in to change notification settings - Fork 683
Add support for URI encoding / decoding. #177
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
d90f518
to
7c343a3
Compare
} | ||
|
||
ecma_string_to_zt_string (input_string_p, | ||
input_start_p, (ssize_t) buffer_size); |
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.
Third parameter should be also on its own line.
I hope I fixed everything and use MEM_DEFINE_LOCAL_ARRAY for local memory allocation. Is there anything else? |
ecma_builtin_global_object_hex_to_byte (ecma_char_t *source_p) /**< source string */ | ||
{ | ||
uint32_t decoded_byte = 0; | ||
int 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.
I think we can i
declaration into for
header.
@zherczeg seams OK. I have the only request: Please, add comments inside the function that describes the logic behind. |
Well, there are very few comments inside function bodies in Jerry. I just followed the current style. |
Everything is done. |
character = (character << 6) + (decoded_byte & 0x3f); | ||
input_char_p += 3; | ||
} | ||
while (--count > 0); |
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.
AFAIK: the correct style would be to have the while on the same line as the closing bracket.
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.
I checked the source but it seems do-while is used this way.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
Patch was updated. |
lgtm |
|
thank you |
Rebased & merged: 6027906 |
Add URI encoding/decoding to global object.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu