-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Key visibility #502
Conversation
CC @parkera |
@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"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, Ill update this.
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.
11c30a3
to
590b830
Compare
@swift-ci please test |
@swift-ci please test and merge |
No description provided.