From 18cb14dbf42af858461b48243843f5c7aa96fb79 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 21 Feb 2018 23:43:29 -0500 Subject: [PATCH] just create a message --- src/ZMQ.jl | 2 +- test/runtests.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ZMQ.jl b/src/ZMQ.jl index 0c22561..45cac89 100644 --- a/src/ZMQ.jl +++ b/src/ZMQ.jl @@ -382,7 +382,7 @@ end isfreed(m::Message) = haskey(gc_protect, m.handle) # AbstractArray behaviors: -similar(a::Message, ::Type{T}, dims::Dims) where {T} = Array{T}(dims) # ? +similar(a::Message, T, dims::Dims) = Array{T}(dims) # ? # TODO: change `Any` to `Ref{Message}` when 0.6 support is dropped. length(zmsg::Message) = Int(ccall((:zmq_msg_size, zmq), Csize_t, (Any,), zmsg)) size(zmsg::Message) = (length(zmsg),) diff --git a/test/runtests.jl b/test/runtests.jl index 36f7147..ec3ede5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -53,7 +53,7 @@ ZMQ.send(s2, Message("test request")) ZMQ.send(s1, Message("test response")) @assert (unsafe_string(ZMQ.recv(s2)) == "test response") -# msg = Message("hello") +msg = Message("hello") # @assert similar(msg, UInt8, 5) isa Vector{UInt8} # @assert copy(msg) == UInt8[0x68, 0x65, 0x6c, 0x6c, 0x6f]