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

Prepare for registration #7

Merged
merged 2 commits into from
Dec 21, 2021
Merged

Prepare for registration #7

merged 2 commits into from
Dec 21, 2021

Conversation

jmert
Copy link
Owner

@jmert jmert commented Dec 21, 2021

Make several changes intended to prepare for package registration in the General.jl registry. Changes include:

  • Separating the low-level and high-level mmap functions from each other.
  • Adding slightly more detail to usage documentation.
  • Ensuring tests check for inferability of the results.

This cleans up the method list for the intended user-facing `mmap`
function just a little bit --- namely, the function signature
involving a `RawFD` argument is no longer shown.

Simultaneously, we slightly relax the type constraints on all of the
high-level `mmap` methods to accept any `<:Array{T}` type so that
both specific-shape arrays (i.e. `Vector{T}`, `Matrix{T}`) and the
generic `Array{T}` argument can be used in user code to do the same
thing.

(Only the number of dimensions arguments matters in the end, so the
confusing `UnixMmap.mmap(Vector{Float64}, (3, 64))` actually returns a
matrix, but I find that less objectionable than not permitting
`UnixMmap.mmap(Matrix{Float64}, (3, 64))` to even work.)
@jmert jmert merged commit 1c46181 into master Dec 21, 2021
@jmert jmert deleted the register branch December 21, 2021 02:07
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.

None yet

1 participant