-
Notifications
You must be signed in to change notification settings - Fork 169
aws_byte_cursor_read_hex_u8() and other string helpers #657
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
singku
reviewed
Jul 21, 2020
graebm
commented
Jul 21, 2020
Comment on lines
+650
to
+660
| AWS_COMMON_API bool aws_byte_cursor_read_be64(struct aws_byte_cursor *cur, uint64_t *var); | ||
|
|
||
| /** | ||
| * Reads a 64-bit value in network byte order from cur, and places it in host | ||
| * Reads a 32-bit value in network byte order from cur, and places it in host | ||
| * byte order into var. | ||
| * | ||
| * On success, returns true and updates the cursor pointer/length accordingly. | ||
| * If there is insufficient space in the cursor, returns false, leaving the | ||
| * cursor unchanged. | ||
| */ | ||
| AWS_COMMON_API bool aws_byte_cursor_read_float_be64(struct aws_byte_cursor *cur, double *var); | ||
| AWS_COMMON_API bool aws_byte_cursor_read_float_be32(struct aws_byte_cursor *cur, float *var); |
Contributor
Author
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.
These didn't really change names. I just moved them so all the whole-number read functions were together and all the read_float functions were together
singku
approved these changes
Jul 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
new
aws_byte_cursor_read_hex_u8(): Reads 2 hex characters from ASCII/UTF-8 text to produce an 8-bit number.new
aws_lookup_table_hex_to_num_get(): Returns lookup table to go from ASCII/UTF-8 hex character to a number (0-15).new
aws_string_new_from_cursor()andaws_string_new_from_buf(): obviouslyfixed
aws_byte_cursor_next_split(): fixed to handle source with 0 len and NULL ptrBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.