Skip to content

[cxx-interop] Allow retain/release operations to return an unsigned integer #83753

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

Conversation

egorzhdan
Copy link
Contributor

Release/retain functions for C++ foreign reference types might return a reference count as an integer value.

Swift previously emitted an error for such functions, saying that the retain/release functions need to return void or a reference to the value.

rdar://157853183

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Aug 15, 2025
@egorzhdan egorzhdan force-pushed the egorzhdan/retain-release-unsigned branch from 729cde3 to 30f0ad8 Compare August 15, 2025 14:11
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

…nteger

Release/retain functions for C++ foreign reference types might return a reference count as an integer value.

Swift previously emitted an error for such functions, saying that the retain/release functions need to return void or a reference to the value.

rdar://157853183
@egorzhdan egorzhdan force-pushed the egorzhdan/retain-release-unsigned branch from 30f0ad8 to 3887ed0 Compare August 15, 2025 16:31
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan
Copy link
Contributor Author

@swift-ci please test Windows

@egorzhdan egorzhdan merged commit d8edd86 into swiftlang:main Aug 18, 2025
3 checks passed
@egorzhdan egorzhdan deleted the egorzhdan/retain-release-unsigned branch August 18, 2025 10:52
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++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants