# Seeking clarification on Ptr vs Ref in ccall

**URL:** https://discourse.julialang.org/t/seeking-clarification-on-ptr-vs-ref-in-ccall/96883
**Category:** General Usage
**Tags:** ccall
**Created:** [March 31, 2023, 8:19am UTC](https://discourse.julialang.org/t/seeking-clarification-on-ptr-vs-ref-in-ccall/96883 "2023-03-31T08:19:28Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)
#### Post date: [March 31, 2023, 10:41am UTC](https://discourse.julialang.org/t/seeking-clarification-on-ptr-vs-ref-in-ccall/96883/3 "2023-03-31T10:41:08Z")

</div>

In [Initialize buffer for ccall - #2 by stevengj](https://discourse.julialang.org/t/initialize-buffer-for-ccall/52659/2), the suggestion seems to be to use `Ptr`. Would it be more correct to pass a `Ref` in this instance?

---

_[View the full topic](https://discourse.julialang.org/t/seeking-clarification-on-ptr-vs-ref-in-ccall/96883)._
