Skip to content

Commit dea767e

Browse files
authored
Merge pull request #62179 from glessard/se0370-changelog
[changelog] Describe SE-0370
2 parents e5bc6a1 + 0eb2fce commit dea767e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
1818
}
1919
}
2020
```
21+
* [SE-0370][]:
22+
23+
The API of `UnsafeMutableRawPointer`, `UnsafeMutableBufferPointer`, `UnsafeMutableRawBufferPointer` were improved, adding previously missing initialization (and deinitialization) methods, including more performant initialization from `Collection` types.
24+
25+
For `UnsafeMutablePointer<T>` and `UnsafeMutableBufferPointer<T>`, method names containing the word "assign" were renamed to use the word "update", and many more were added. Every multi-element initialization method of `UnsafeMutablePointer` and `UnsafeMutableBufferPointer` now has a corresponding "update" method.
26+
27+
Slices of `UnsafeBufferPointer`, `UnsafeRawBufferPointer`, `UnsafeMutableBufferPointer` and `UnsafeMutableRawBufferPointer` now share the collection-like API of their base type. For example, given an initialized `b: UnsafeMutableBufferPointer<Int>`, the following lines are synonymous:
28+
```swift
29+
b.update(repeating: 0)
30+
b[b.startIndex..<b.endIndex].update(repeating: 0)
31+
```
2132

2233
* [SE-0365][]:
2334

@@ -9599,6 +9610,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
95999610
[SE-0358]: <https://github.com/apple/swift-evolution/blob/main/proposals/0358-primary-associated-types-in-stdlib.md>
96009611
[SE-0362]: <https://github.com/apple/swift-evolution/blob/main/proposals/0362-piecemeal-future-features.md>
96019612
[SE-0365]: <https://github.com/apple/swift-evolution/blob/main/proposals/0365-implicit-self-weak-capture.md>
9613+
[SE-0370]: <https://github.com/apple/swift-evolution/blob/main/proposals/0370-pointer-family-initialization-improvements.md>
96029614

96039615
[#42697]: <https://github.com/apple/swift/issues/42697>
96049616
[#42728]: <https://github.com/apple/swift/issues/42728>

0 commit comments

Comments
 (0)