-
Notifications
You must be signed in to change notification settings - Fork 23
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
Clarify bytestring conversion docstrings #81
Comments
thanks for raising this issue. the API looks too complex for me -- is anyone using and as mentioned in #35 #36 #37 we should redesign (and provide of_cstruct / to_cstruct) this API. any takers? (hint: #69 should as well be addressed at that time) |
I think EDIT: To be clear I was only complaining about the docstrings :) |
I'd prefer to keep of_bytes_raw and fix the docstrings :) |
|
adapt the V6 of_string* docstrings from the V4 versions, fixes #81
CHANGES: * Add host and subnet Seq.t iterators for Ipaddr.V4.prefix, Ipaddr.V6.Prefix and Ipaddr.Prefix (mirage/ocaml-ipaddr#107 @verbosemode @dinosaure) * Ipaddr.V4.compare: use Int32.unsigned_compare, as provided since OCaml 4.08 (mirage/ocaml-ipaddr#118 @reynir) * Ipaddr.V6.t is a string, not a byte vector anymore (so it is immutable) (mirage/ocaml-ipaddr#119 @reynir, restoring 4.08 compatibility mirage/ocaml-ipaddr#121) * Provide Ipaddr.Prefix.address (since 5.0.0, Ipaddr.V4.Prefix.address and Ipaddr.V6.Prefix.address have been provided, but Ipaddr.Prefix.address was forgotten) (mirage/ocaml-ipaddr#122 @hannesm) * Fix further docstrings (mirage/ocaml-ipaddr#123, fixes mirage/ocaml-ipaddr#81, @hannesm @reynir)
We currently have this:
From reading the docstring it was unclear to me that
actually means (which AFAICT is the only failure mode?):
It is also misleading that
of_bytes_raw
suggests that it is the same asof_bytes_exn
; as evidenced below,of_bytes_raw
does not impose an upper bound on the string length:Not overly important I guess, but this tripped me during a code review.
The text was updated successfully, but these errors were encountered: