static ffi.Pointer<ffi.Void> toPointer(Version? val) { if (val == null) { return ffi.nullptr; } final result = malloc.call<VersionNative>(); result.ref = toNative(val); return result.cast(); }