Add Cstruct.rev to build a reversed cstruct#221
Merged
avsm merged 3 commits intomirage:masterfrom Feb 26, 2019
Merged
Conversation
avsm
reviewed
Feb 22, 2019
Member
|
looks like it does what it says on the tin! :) happy to merge this |
avsm
reviewed
Feb 22, 2019
lib/cstruct.mli
Outdated
| * the result is a newly created [t] in the zero- and one-element cases. *) | ||
|
|
||
| val rev: t -> t | ||
| (** [rev t] is [t] in reverse order. *) |
Member
There was a problem hiding this comment.
perhaps clarify that this allocates a fresh [t] and does not mutate the input
avsm
added a commit
to avsm/opam-repository
that referenced
this pull request
Feb 26, 2019
…struct-lwt (3.5.0) CHANGES: - Remove trailing spaces in hexdump output (mirage/ocaml-cstruct#219 @emillon) - Add `Cstruct.rev` to allocate a reversed cstruct (mirage/ocaml-cstruct#221 @emillon) - `Cstruct_unix` now uses the post-OCaml 4.06 `Unix.map_file` instead of the deprecated Bigarray `map_file` that was removed in OCaml 4.08 (@avsm, see ocaml/ocaml#2263) - Remove unnecessary `(wrapped false)` in the build system (@avsm) - Correct ocamldoc to the right `cstruct-ppx` package pointer (@avsm)
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
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.
It's like
List.rev, but for cstructs. Let me know what you think.