-
Notifications
You must be signed in to change notification settings - Fork 239
[cxx-interop] Add SWIFT_RETUNRS_(UN)RETAINED discussions to C++ interop docs #1077
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
base: main
Are you sure you want to change the base?
[cxx-interop] Add SWIFT_RETUNRS_(UN)RETAINED discussions to C++ interop docs #1077
Conversation
3d5f9dd
to
08c62b4
Compare
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 had some comments inline. cc @egorzhdan just in case he also wants to take a look.
CC: @j-hui can you also please take a look? |
CC: @ravikandhadai |
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.
Thanks for documenting these annotations! I left some suggestions for how you can paraphrase things to be a little clearer.
|
||
Note that the Swift compiler will automatically infer the ownership conventons for Swift functions returning `SWIFT_SHARED_REFERENCE` types. | ||
See [Exposing C++ Shared Reference Types back from Swift](#exposing-c-shared-reference-types-back-from-swift) for calling Swift functions returning `SWIFT_SHARED_REFERENCE` types from C++. | ||
|
||
### Inheritance and Virtual Member Functions |
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.
TODO: ### -> ####
Documenting the usage of
SWIFT_RETUNRS_(UN)RETAINED
annotations to specify the ownership convention of the returnedSWIFT_SHARED_REFERENCE
types from C++ functions and methodsrdar://116817243