Skip to content

Conversation

Xazax-hun
Copy link
Contributor

Since these APIs operate on unsafes we consider them unsafe by default. This PR adds APINotes to override these defaults as these APIs will not touch the underlying buffer. This should slightly reduce the number of unsafes in user code.

rdar://159839254

@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Sep 19, 2025
Copy link
Contributor

@susmonteiro susmonteiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@Xazax-hun Xazax-hun force-pushed the view-size-query-safe branch 2 times, most recently from cc422f9 to 53a27c3 Compare September 24, 2025 15:29
Since these APIs operate on unsafes we consider them unsafe by default.
This PR adds APINotes to override these defaults as these APIs will not
touch the underlying buffer. This should slightly reduce the number of
`unsafe`s in user code.

rdar://159839254
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun Xazax-hun enabled auto-merge September 25, 2025 15:08
@Xazax-hun Xazax-hun merged commit 35fab79 into swiftlang:main Sep 25, 2025
3 checks passed
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.

3 participants