-
Notifications
You must be signed in to change notification settings - Fork 686
Add strtol to jerry-libc and make use of it in jerry-main #1891
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
Add strtol to jerry-libc and make use of it in jerry-main #1891
Conversation
LaszloLango
left a comment
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.
LGTM
jerry-libc/jerry-libc.c
Outdated
|
|
||
| const char *str = nptr; | ||
|
|
||
| /* Skip leading whitespace */ |
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.
whitespaces
jerry-libc/jerry-libc.c
Outdated
| str++; | ||
| } | ||
|
|
||
| /* Process base-10 digits */ |
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.
full stop after sentences
| } | ||
|
|
||
| /* Set endptr and return result*/ | ||
| if (digits) |
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.
digits coulsd be a bool
|
updated according to the review and rebased onto latest master |
zherczeg
left a comment
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.
LGTM
jerry-libc/jerry-libc.c
Outdated
| int base) /**< numerical base or radix (MUST be 10) */ | ||
| { | ||
| assert (base == 10); | ||
| (void) base; /* unused */ |
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.
Unused.
As a side effect, refactor the variable types in `print_unhandled_exception` to reduce the overuse of sized integer types (generic `unsigned int` is better than `uint32_t` if there is no actual requirement on integer width). JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Artik053 board is publicly announced about one month ago. So I updated tizenrt-artik05x reference board from sidk_s5jt200 to artik053. Now, tizenrt-artik05x port works with latest TizenRT repo on artik053 board. Also, I replaced str_to_uint to strtol since #1891 is landed. JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
As a side effect, refactor the variable types in
print_unhandled_exceptionto reduce the overuse of sized integertypes (generic
unsigned intis better thanuint32_tif there isno actual requirement on integer width).
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu