# Build a UnionAll from C

**URL:** <https://discourse.julialang.org/t/build-a-unionall-from-c/1729>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 27, 2017, 9:46pm UTC](https://discourse.julialang.org/t/build-a-unionall-from-c/1729 "2017-01-27T21:46:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)\
**Post date:** [January 27, 2017, 9:46pm UTC](https://discourse.julialang.org/t/build-a-unionall-from-c/1729/1 "2017-01-27T21:46:53Z")

</div>

Prior to 0.6, I constructed parametric types with `jl_new_datatype` and setting a list of parameters. Then a concrete instantiation of the type could be set using `jl_apply_type`. In 0.6, however, the latter seems to expect a `jl_unionall_t*` rather than a `jl_datatype_t*`. What is the correct way to tackle this in 0.6?

---

<div class="post-metadata">

**Author:** ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)\
**Post date:** [January 30, 2017, 11:20am UTC](https://discourse.julialang.org/t/build-a-unionall-from-c/1729/2 "2017-01-30T11:20:17Z")

</div>

It seems that `jl_apply_type` must now be applied to `dt->name->wrapper`, where `dt` is the result from `jl_new_datatype`. Is that the correct way or are there caveats?
