# Embedding: jl\_new\_array signature seems incorrect in documentation

**URL:** https://discourse.julialang.org/t/embedding-jl-new-array-signature-seems-incorrect-in-documentation/3149
**Category:** General Usage
**Created:** [April 10, 2017, 9:14pm UTC](https://discourse.julialang.org/t/embedding-jl-new-array-signature-seems-incorrect-in-documentation/3149 "2017-04-10T21:14:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SylvainCorlay](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaincorlay/32/923_2.png) [@SylvainCorlay](https://discourse.julialang.org/u/SylvainCorlay)
#### Post date: [April 10, 2017, 9:14pm UTC](https://discourse.julialang.org/t/embedding-jl-new-array-signature-seems-incorrect-in-documentation/3149/1 "2017-04-10T21:14:15Z")

</div>

Up until v0.3, the signature of `jl_new_array` was

```julia
jl_array_t *jl_new_array(jl_value_t *atype, jl_tuple_t *dims)

```

And as off v0.4, the signature has changed to

```julia
jl_array_t *jl_new_array(jl_value_t *atype, jl_value_t *dims)

```

The documentation still reflects the old signature: [https://docs.julialang.org/en/latest/devdocs/object.html#Object-allocation-1](https://docs.julialang.org/en/latest/devdocs/object.html#Object-allocation-1)

More practically, I wonder what is the right way to allocate the `dims` tuple to be passed to `jl_new_array` with a given size from the C API. Is there any example of that somewhere?

---

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [April 10, 2017, 9:31pm UTC](https://discourse.julialang.org/t/embedding-jl-new-array-signature-seems-incorrect-in-documentation/3149/2 "2017-04-10T21:31:19Z")

</div>

It is still a tuple though it’s not called `jl_tuple_t` anymore. You can create the tuple type with `jl_apply_tuple_type` or `jl_apply_tuple_type_v` and then allocate the object with `jl_new_bits` or `jl_new_struct_uninit`. The layout is just an array of `Int` so that’s what you need to pass to `jl_new_bits` or cast the result of `jl_new_struct_uninit` to before filling the numbers in.

---

<div class="post-metadata">

### Author: ![SylvainCorlay](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaincorlay/32/923_2.png) [@SylvainCorlay](https://discourse.julialang.org/u/SylvainCorlay)
#### Post date: [April 10, 2017, 10:43pm UTC](https://discourse.julialang.org/t/embedding-jl-new-array-signature-seems-incorrect-in-documentation/3149/3 "2017-04-10T22:43:57Z")

</div>

Yay, it works! Thanks for helping.
