From 47786d17feb3969d5fd3e27a17eaad6dbb49d331 Mon Sep 17 00:00:00 2001 From: JamesWrigley Date: Tue, 8 Oct 2024 21:21:04 +0200 Subject: [PATCH] Add the Message(::DenseVector) constructor back to the docs Previously `Message(::Array)` would match against the `Message(::Any, ::Ptr, ::Integer)` constructor (which was documented twice). --- docs/src/reference.md | 2 +- src/message.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/reference.md b/docs/src/reference.md index 099c22a..89e2fc2 100644 --- a/docs/src/reference.md +++ b/docs/src/reference.md @@ -58,7 +58,7 @@ Message(::Integer) Message(::Any) Message(::String) Message(::SubString{String}) -Message(::Array) +Message(::DenseVector) Message(::IOBuffer) isfreed(::Message) ``` diff --git a/src/message.jl b/src/message.jl index 386399b..ac2fb5d 100644 --- a/src/message.jl +++ b/src/message.jl @@ -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))