Skip to content

Key visibility #502

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 2 commits into from
Oct 6, 2016
Merged

Key visibility #502

merged 2 commits into from
Oct 6, 2016

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Aug 4, 2016

No description provided.

@compnerd
Copy link
Member Author

compnerd commented Aug 4, 2016

CC @parkera

@compnerd
Copy link
Member Author

compnerd commented Aug 4, 2016

@swift-ci please test

@@ -41,7 +41,7 @@ typedef CF_ENUM(CFIndex, CFDateFormatterAmbiguousYearHandling) {

extern UCalendar *__CFCalendarCreateUCalendar(CFStringRef calendarID, CFStringRef localeID, CFTimeZoneRef tz);

static CONST_STRING_DECL(kCFDateFormatterFormattingContextKey, "kCFDateFormatterFormattingContextKey");
CONST_STRING_DECL(kCFDateFormatterFormattingContextKey, "kCFDateFormatterFormattingContextKey");
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this meant to switch to the PE version as below? Otherwise, why remove the static?

Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed that they were used with externally visible functions, so it seems that the key could be used externally.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sometimes these are used with the same functions but only meant to be used internally to CF.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, Ill update this.

@compnerd
Copy link
Member Author

ping?

CC: @phausler

Use the private extern version of the constnat string macro.  This allows for
the constnat string macro to be used for defining keys which are exported.  It
also avoids having two different copies of the keys which are used independently
based on the compiler version.
These are not meant to be internal, but mixing the static here would prevent the
key from being defined on COFF targets which use dllexport semantics which
require that the symbol have external visibility.
@compnerd
Copy link
Member Author

compnerd commented Oct 6, 2016

@swift-ci please test

@parkera
Copy link
Contributor

parkera commented Oct 6, 2016

@swift-ci please test and merge

@swift-ci swift-ci merged commit c3e0d8f into swiftlang:master Oct 6, 2016
@compnerd compnerd deleted the key-visibility branch October 7, 2016 02:19
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