I am not sure about more complicated things, like alignment... As for the general use case, your biggest risk is probably the GC. I see that you use a stack `object` as opposed to a garbage-collected `ref object`, but it is important to make sure that the C code immediately copies a value out if the object were ever to contain `ref` s.
So my first inclination is that it is safe if you as the programmer ensure that there will be no dangling references. I hope someone else can provide a more technical answer, lol.