Skip to content

Commit

Permalink
just create a message
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeits committed Feb 22, 2018
1 parent eaa9bf9 commit 18cb14d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ZMQ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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),)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 18cb14d

Please sign in to comment.