# Translating &variable to modern Julia

**URL:** <https://discourse.julialang.org/t/translating-variable-to-modern-julia/60797>\
**Category:** General Usage\
**Tags:** ccall\
**Created:** [May 8, 2021, 8:39pm UTC](https://discourse.julialang.org/t/translating-variable-to-modern-julia/60797 "2021-05-08T20:39:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [May 8, 2021, 8:39pm UTC](https://discourse.julialang.org/t/translating-variable-to-modern-julia/60797/1 "2021-05-08T20:39:37Z")

</div>

[https://github.com/acroy/Lasem.jl/blob/master/src/Lasem.jl#L45](https://github.com/acroy/Lasem.jl/blob/master/src/Lasem.jl#L45)

is

```julia
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

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

```

by replacing the `Void`s with `Cvoid`.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 8, 2021, 9:25pm UTC](https://discourse.julialang.org/t/translating-variable-to-modern-julia/60797/2 "2021-05-08T21:25:18Z")

</div>

> [@jzr](#):
>
> which contains `&viewport` , currently invalid syntax. I guess this was valid some years ago. What is the current version of this line?

It sounds like you want:

```julia
ccall((:lsm_dom_view_set_viewport_pixels, liblasem), Cvoid, (Ptr{Cvoid}, Ref{LsmBox}), view, viewport)

```
