Skip to content

Foundation: wrap _withStackOrHeapBuffer #2151

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
Apr 22, 2019

Conversation

compnerd
Copy link
Member

_withStackOrHeapBuffer is used in multiple functions in Data which are
marked as @inlineable. Since _withStackOrHeapBuffer is inlined into
the body, this results in the users getting references to
_CFThreadIsMain which is SPI in CoreFoundation for Foundation.
Furthermore, since the CoreFoundation interfaces are not exported from
Foundation, we cannot fulfill the dependency. Create a wrapper over
_withStackOrHeapBuffer to allow the dependency to be contained.

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd compnerd force-pushed the inline-inline-inline branch from 0ec277a to 44cd237 Compare April 21, 2019 16:28
@compnerd
Copy link
Member Author

@swift-ci please test

`_withStackOrHeapBuffer` is used in multiple functions in Data which are
marked as `@inlineable`.  Since `_withStackOrHeapBuffer` is inlined into
the body, this results in the users getting references to
`_CFThreadIsMain` which is SPI in CoreFoundation for Foundation.
Furthermore, since the CoreFoundation interfaces are not exported from
Foundation, we cannot fulfill the dependency.  Create a wrapper over
`_withStackOrHeapBuffer` to allow the dependency to be contained.
@compnerd compnerd force-pushed the inline-inline-inline branch from 44cd237 to 51aff9b Compare April 21, 2019 19:23
@compnerd
Copy link
Member Author

@swift-ci please test

@millenomi
Copy link
Contributor

@swift-ci please test and merge

1 similar comment
@millenomi
Copy link
Contributor

@swift-ci please test and merge

@swift-ci swift-ci merged commit a764480 into swiftlang:master Apr 22, 2019
@compnerd compnerd deleted the inline-inline-inline branch April 22, 2019 18:22
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