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