Skip to content

Commit fe2f99f

Browse files
committed
[cxx-interop] Cast data to the correct type.
The implicit conversions are OK in C but C++ will error. To make this header valid in both C and C++ we should just always cast.
1 parent 171e0e2 commit fe2f99f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/SwiftShims/DispatchOverlayShims.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ static inline unsigned int
215215
_swift_dispatch_data_apply(
216216
__swift_shims_dispatch_data_t data,
217217
__swift_shims_dispatch_data_applier SWIFT_DISPATCH_NOESCAPE applier) {
218-
return dispatch_data_apply(data, ^bool(dispatch_data_t data, size_t off, const void *loc, size_t size){
219-
return applier(data, off, loc, size);
218+
return dispatch_data_apply((dispatch_data_t)data, ^bool(dispatch_data_t data, size_t off, const void *loc, size_t size){
219+
return applier((__swift_shims_dispatch_data_t)data, off, loc, size);
220220
});
221221
}
222222

0 commit comments

Comments
 (0)