Skip to content

Conversation

@graebm
Copy link
Contributor

@graebm graebm commented Jul 2, 2020

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() and aws_string_new_from_buf(): obviously

fixed aws_byte_cursor_next_split(): fixed to handle source with 0 len and NULL ptr

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

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

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

@graebm graebm merged commit db7491d into master Aug 6, 2020
@graebm graebm deleted the query branch August 6, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants