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

Add Unsafe operations #317

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

smuenzel
Copy link

Add Unsafe operations to Cstruct, and the ppx generator.

Unsafe accessors are useful when it can be guaranteed that we will not access any values out of bounds, in order to not spend time on bounds checks.
For example if we wrap a cstruct x in an X.t, which is always of the right size, we do not have to force clients of that module to bounds check every access.

@smuenzel smuenzel marked this pull request as ready for review November 18, 2024 21:50
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.

1 participant