Skip to content
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

[interop][SwiftToCxx] consuming parameters should be passed using an … #69473

Merged
merged 5 commits into from
Oct 30, 2023

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Oct 28, 2023

…additional copy

Fixes #69372

@hyp hyp added the c++ interop Feature: Interoperability with C++ label Oct 28, 2023
@hyp
Copy link
Contributor Author

hyp commented Oct 28, 2023

@swift-ci please test

1 similar comment
@hyp
Copy link
Contributor Author

hyp commented Oct 28, 2023

@swift-ci please test

@hyp hyp force-pushed the eng/consuming-params branch from 5a4aeba to 7f05bba Compare October 29, 2023 20:35
@hyp
Copy link
Contributor Author

hyp commented Oct 29, 2023

@swift-ci please test

1 similar comment
@hyp
Copy link
Contributor Author

hyp commented Oct 29, 2023

@swift-ci please test

@hyp hyp force-pushed the eng/consuming-params branch from 2eb1d06 to 8965b41 Compare October 30, 2023 00:08
@hyp
Copy link
Contributor Author

hyp commented Oct 30, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Oct 30, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Oct 30, 2023

@swift-ci please test source compatibility

@mrousavy
Copy link

Hey - not sure if this is related, but can a Swift function with borrowing / inout parameters be passed to C++ as C-style function pointers? This PR ensures a copy for all params, no?

I have an issue where a C++ type is double-freed when calling Swift C-style functions from C++: #78292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ swift to c++ Feature → c++ interop: swift to c++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C++ interop crash adding Strings of > 15 bytes to Swift Array.
3 participants