Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Conversation

zherczeg
Copy link
Member

Add URI encoding/decoding to global object.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu

@zherczeg zherczeg force-pushed the uri_devel branch 2 times, most recently from d90f518 to 7c343a3 Compare June 12, 2015 08:13
@egavrin egavrin self-assigned this Jun 12, 2015
@egavrin egavrin added this to the ECMA builtins milestone Jun 12, 2015
@egavrin egavrin added ecma builtins Related to ECMA built-in routines development Feature implementation labels Jun 12, 2015
}

ecma_string_to_zt_string (input_string_p,
input_start_p, (ssize_t) buffer_size);
Copy link
Contributor

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.

@zherczeg
Copy link
Member Author

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;
Copy link
Contributor

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.

@egavrin
Copy link
Contributor

egavrin commented Jun 15, 2015

@zherczeg seams OK. I have the only request: Please, add comments inside the function that describes the logic behind.

@egavrin egavrin assigned zherczeg and unassigned egavrin Jun 15, 2015
@zherczeg
Copy link
Member Author

Well, there are very few comments inside function bodies in Jerry. I just followed the current style.

@zherczeg
Copy link
Member Author

Everything is done.

character = (character << 6) + (decoded_byte & 0x3f);
input_char_p += 3;
}
while (--count > 0);
Copy link
Contributor

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.

Copy link
Member Author

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.

@galpeter galpeter mentioned this pull request Jun 17, 2015
29 tasks
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
@zherczeg
Copy link
Member Author

Patch was updated.

@galpeter
Copy link
Contributor

lgtm

@egavrin
Copy link
Contributor

egavrin commented Jun 18, 2015

make push

@zherczeg
Copy link
Member Author

thank you

@galpeter
Copy link
Contributor

Rebased & merged: 6027906

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Feature implementation ecma builtins Related to ECMA built-in routines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants