Translating &variable to modern Julia

is

ccall((:lsm_dom_view_set_viewport_pixels, liblasem), Void, (Ptr{Void}, Ptr{LsmBox} ), view, &viewport)

which contains &viewport, currently invalid syntax. I guess this was valid some years ago. What is the current version of this line?

I’ve gotten as far as

ccall((:lsm_dom_view_set_viewport_pixels, liblasem), Cvoid, (Ptr{Cvoid}, Ptr{LsmBox} ), view, &viewport)

by replacing the Voids with Cvoid.

It sounds like you want:

ccall((:lsm_dom_view_set_viewport_pixels, liblasem), Cvoid, (Ptr{Cvoid}, Ref{LsmBox}), view, viewport)
1 Like