Hell, the first example isn't equivalent code. You can't share references across an FFI boundary with C.
Hell, the first example isn't equivalent code. You can't share references across an FFI boundary with C.