Skip to content

[CF] Match some declarations with their headers. #2598

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
merged 1 commit into from
Jan 9, 2020

Conversation

3405691582
Copy link
Member

It appears that standardization on CF types versus C99 types was made,
but some changes were missing. As I understand it, on platforms where
Boolean (a.k.a. unsigned char, when !DEPLOYMENT_RUNTIME_SWIFT) is
convertible to bool, this doesn't cause a problem, but on OpenBSD,
bool (a.k.a., _Bool) is an enum, so causes an error.

That being said, it certainly appears intended that these should be
written as Boolean.

It appears that standardization on CF types versus C99 types was made,
but some changes were missing. As I understand it, on platforms where
Boolean (a.k.a. unsigned char, when !DEPLOYMENT_RUNTIME_SWIFT) is
convertible to bool, this doesn't cause a problem, but on OpenBSD,
bool (a.k.a., _Bool) is an enum, so causes an error.

That being said, it certainly appears intended that these should be
written as Boolean.
@compnerd
Copy link
Member

compnerd commented Jan 8, 2020

@swift-ci please test

@compnerd compnerd merged commit 0374c7d into swiftlang:master Jan 9, 2020
@3405691582 3405691582 deleted the CF_BooleanTypeConversion branch January 11, 2020 18:12
3405691582 added a commit to 3405691582/swift-corelibs-foundation that referenced this pull request May 11, 2020
In swiftlang#2598, we brought the prototypes and declarations into alignment for
_CFPropertyListCreateFiltered and _CFPropertyListCreateSingleValue,
namely, using a `Boolean` for prototype and declaration, since they were
not matched.

It appears with the Catalina merge they were brought into alignment the
other way around, namely using `bool` instead. Since the Catalina merge
chose `bool`, let's just go with that.
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.

2 participants