Skip to content

[5.9][cxx-interop] add a SWIFT_MUTATING customization macro #66396

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
Jun 7, 2023

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Jun 6, 2023

Fixes #66322

  • Explanation:
    This macro is needed to allow users to annotate constant C++ member functions that do mutate the object, e.g. using a mutable C++ field. This annotation makes Swift import them as mutating methods then. This allows users to call such constant functions from Swift without worrying about correctness of such a call invocation.
  • Scope: Swift's and C++ interoperability, <swift/bridging> header
  • Risk: Low. Additional only change.
  • Testing: Swift unit tests.
  • PR: [cxx-interop] add a SWIFT_MUTATING customization macro #66374

@hyp hyp added the swift 5.9 label Jun 6, 2023
@hyp hyp requested a review from a team as a code owner June 6, 2023 23:07
@hyp
Copy link
Contributor Author

hyp commented Jun 6, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Jun 6, 2023

@swift-ci please test source compatibility

@hyp hyp added the c++ interop Feature: Interoperability with C++ label Jun 6, 2023
@hyp hyp merged commit 01b0102 into swiftlang:release/5.9 Jun 7, 2023
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 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants