Skip to content
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

updates to serdes APIs #126

Merged
merged 4 commits into from
May 17, 2020
Merged

updates to serdes APIs #126

merged 4 commits into from
May 17, 2020

Conversation

cjihrig
Copy link
Collaborator

@cjihrig cjihrig commented May 16, 2020

  • The bounds checking macros are converted to functions, and work in terms of sizes instead of data types.
  • iovec_t and ciovec_t support is added.

Fixes: #69

Tested with these changes made in Node.js - https://ci.nodejs.org/job/node-test-commit/38386/

This commit updates the serdes bounds checking macros to be
written in terms of sizes instead of data types. The reasons
for the change are:

1. Many bounds checks are needed in terms of a string length,
   which wasn't handled by the previous implementation.
2. The previous version used partial data type names, which
   could look confusing in calling code. This new version will
   take more characters, but be more explicit/understandable.
This commit adds serdes support for the iov types.
This commit adds serdes functions for reading iovec_t and
ciovec_t arrays.
This commit changes the bounds checking macros into functions.
In practice, this silences warnings about comparisons of
unsigned expressions >= always being true.
@cjihrig cjihrig mentioned this pull request May 16, 2020
@cjihrig cjihrig merged commit 84fcbec into master May 17, 2020
@cjihrig cjihrig deleted the bounds branch May 17, 2020 14:59
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.

Add serdes API
1 participant