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

latest ccall changes break ZMQ.jl #71

Closed
skariel opened this issue Mar 8, 2015 · 2 comments
Closed

latest ccall changes break ZMQ.jl #71

skariel opened this issue Mar 8, 2015 · 2 comments

Comments

@skariel
Copy link
Contributor

skariel commented Mar 8, 2015

see discussion here:

https://groups.google.com/forum/?fromgroups=#!topic/julia-users/vPbhQmQR1pE
https://groups.google.com/forum/?fromgroups=#!topic/julia-users/qi6HpMrAS_A

@jiahao
Copy link
Contributor

jiahao commented Mar 8, 2015

Confirming that rolling back julia to 59eb72a (the last commit before JuliaLang/julia#9986) fixes the problem with IJulia for me.

@skariel
Copy link
Contributor Author

skariel commented Mar 8, 2015

I've managed to fix with the following changes to ZMQ.jl:

change line 403 from:

    Message(m::ByteString) = Message(m, convert(Ptr{Uint8}, pointer(m.data)), sizeof(m))

to:

    Message(m::ByteString) = Message(m, Base.unsafe_convert(Ptr{Uint8}, pointer(m.data)), sizeof(m))

change line 500 from

    rc = ccall((:zmq_msg_send, zmq), Cint, (Ptr{Void}, Ptr{Message}, Cint),
                &zmsg, socket.data, flag)

to:

    rc = ccall((:zmq_msg_send, zmq), Cint, (Ref{Message}, Ptr{Message}, Cint),
                zmsg, socket.data, flag)

of course this has to be done in a backwards compatible way and all, but meanwhile works with me :)

skariel added a commit to skariel/ZMQ.jl that referenced this issue Mar 8, 2015
stevengj added a commit that referenced this issue Mar 9, 2015
fix issue #71 (new ccall api)
@jiahao jiahao closed this as completed Mar 10, 2015
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

No branches or pull requests

2 participants