# Representing c unions and packed types

**URL:** <https://discourse.julialang.org/t/representing-c-unions-and-packed-types/31993>\
**Category:** General Usage\
**Created:** [December 8, 2019, 12:32am UTC](https://discourse.julialang.org/t/representing-c-unions-and-packed-types/31993 "2019-12-08T00:32:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cshenton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cshenton/32/9326_2.png) [@cshenton](https://discourse.julialang.org/u/cshenton)\
**Post date:** [December 8, 2019, 12:32am UTC](https://discourse.julialang.org/t/representing-c-unions-and-packed-types/31993/1 "2019-12-08T00:32:47Z")

</div>

I’m currently writing language bindings for OpenVR to integrate with the Julia game engine I’m building.

I’ve run into two challenges:

- The API uses (quite large) union types for its event system
- The API uses `pragma pack( push, 4 )` to align some of its structs

How can I manage things on the julia side to match these C language features at the API boundary?
