Skip to content

Commit

Permalink
Add the Message(::DenseVector) constructor back to the docs
Browse files Browse the repository at this point in the history
Previously `Message(::Array)` would match against the `Message(::Any, ::Ptr,
::Integer)` constructor (which was documented twice).
  • Loading branch information
JamesWrigley committed Oct 8, 2024
1 parent 873f35f commit 47786d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/src/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Message(::Integer)
Message(::Any)
Message(::String)
Message(::SubString{String})
Message(::Array)
Message(::DenseVector)
Message(::IOBuffer)
isfreed(::Message)
```
Expand Down
4 changes: 2 additions & 2 deletions src/message.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ mutable struct Message <: AbstractArray{UInt8, 1}
Create a message with an array as a buffer (for send). Note: the same
ownership semantics as for [`Message(m::String)`](@ref) apply.
Usually `a` will be a 1D `Array`/`Vector`, but on 1.11+ it can also be a
`Memory`.
Usually `a` will be a 1D `Array`/`Vector`, but on Julia 1.11+ it can also be
a `Memory`.
"""
Message(a::T) where T <: DenseVector = Message(a, pointer(a), sizeof(a))

Expand Down

0 comments on commit 47786d1

Please sign in to comment.