Skip to content

[CF] Add missing DEPLOYMENT_RUNTIME_SWIFT guard. #2594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

3405691582
Copy link
Member

CFArray.c references __CFSwiftBridge which is defined behind
DEPLOYMENT_RUNTIME_SWIFT, so this needs to be behind that guard
as well when DEPLOYMENT_RUNTIME_SWIFT is not set.

CFArray.c references __CFSwiftBridge which is defined behind
DEPLOYMENT_RUNTIME_SWIFT, so this needs to be behind that guard
as well when DEPLOYMENT_RUNTIME_SWIFT is not set.
@@ -971,8 +971,10 @@ void CFArraySortValues(CFMutableArrayRef array, CFRange range, CFComparatorFunct
result = CF_OBJC_CALLV((NSMutableArray *)array, isKindOfClass:[NSMutableArray class]);
immutable = !result;
} else if (CF_IS_SWIFT(CFArrayGetTypeID(), array)) {
#if DEPLOYMENT_RUNTIME_SWIFT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move this up one line, such that the else is inside the guard too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not strictly necessary, because CF_IS_SWIFT becomes (0) in CFinternal.h:733 when DEPLOYMENT_RUNTIME_SWIFT is undefined.

Let me know if you'd prefer it be moved, though, since it won't really hurt.

@compnerd
Copy link
Member

compnerd commented Jan 2, 2020

@swift-ci please test

@compnerd compnerd merged commit 2d7dfdd into swiftlang:master Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants