Skip to content

Commit 24b0150

Browse files
tayloraswiftDougGregor
authored andcommitted
fix typos (#740)
1 parent 9cc90f3 commit 24b0150

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

proposals/0184-improved-pointers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ In detail, the following changes should be made:
9999

100100
Removing `capacity` from `deallocate(capacity:)` will end the confusion over what `deallocate()` does, making it obvious that `deallocate()` will free the *entire* memory block at `self`, just as if `free()` were called on it.
101101

102-
The old `deallocate(capacity:)` method should be marked as `unavailable` since it currently encourages dangerously incorrect code. This avoids misleading future users, forces current users to address this potentially catastrophic memory bug, and leaves the possibility open for us to add a `deallocate(count:)` method in the future, or perhaps even a `reallocate(toCount:)` method.
102+
The old `deallocate(capacity:)` method should be marked as `unavailable` since it currently encourages dangerously incorrect code. This avoids misleading future users, forces current users to address this potentially catastrophic memory bug, and leaves the possibility open for us to add a `deallocate(capacity:)` method in the future, or perhaps even a `reallocate(toCapacity:)` method.
103103

104104
Along similar lines, the `bytes` and `alignedTo` parameters should be removed from the `deallocate(bytes:alignedTo:)` method on `UnsafeMutableRawPointer`.
105105

@@ -228,15 +228,15 @@ struct UnsafeMutablePointer<Pointee>
228228
--- func moveAssign(from:UnsafeMutablePointer<Pointee>, count:Int)
229229
--- func moveInitialize(from:UnsafeMutablePointer<Pointee>, count:Int)
230230
--- func initialize(from:UnsafePointer<Pointee>, count:Int)
231-
--- func initialize(repeating:Element, count:Int)
231+
--- func initialize(to:Pointee, count:Int)
232232
--- func deinitialize(count:Int)
233233
--- func withMemoryRebound<T, Result>(to:T.Type, count:Int, _ body:(UnsafeMutablePointer<T>) -> Result)
234234

235235
+++ func assign(from:UnsafePointer<Pointee>, count:Int = 1)
236236
+++ func moveAssign(from:UnsafeMutablePointer<Pointee>, count:Int = 1)
237237
+++ func moveInitialize(from:UnsafeMutablePointer<Pointee>, count:Int = 1)
238238
+++ func initialize(from:UnsafePointer<Pointee>, count:Int = 1)
239-
+++ func initialize(repeating:Element, count:Int = 1)
239+
+++ func initialize(repeating:Pointee, count:Int = 1)
240240
+++ func deinitialize(count:Int = 1)
241241
+++ func withMemoryRebound<T, Result>(to:T.Type, count:Int = 1, _ body:(UnsafeMutablePointer<T>) -> Result)
242242
}
@@ -276,7 +276,7 @@ struct UnsafeMutableBufferPointer<Element>
276276

277277
+++ func assign(from:UnsafeBufferPointer<Element>)
278278
+++ func assign(from:UnsafeMutableBufferPointer<Element>)
279-
+++ func assign(repeating:Pointee)
279+
+++ func assign(repeating:Element)
280280
+++ func moveAssign(from:UnsafeMutableBufferPointer<Element>)
281281
+++ func moveInitialize(from:UnsafeMutableBufferPointer<Element>)
282282
+++ func initialize(from:UnsafeBufferPointer<Element>)
@@ -293,7 +293,7 @@ struct UnsafeMutableRawBufferPointer
293293
+++ static func allocate(bytes:Int, alignedTo:Int) -> UnsafeMutableRawBufferPointer
294294
func deallocate()
295295
+++ func bindMemory<Element>(to:Element.Type, count:Int)
296-
--- func copyBytes(from: UnsafeRawBufferPointer)
296+
--- func copyBytes(from:UnsafeRawBufferPointer)
297297
+++ func copy(from:UnsafeRawBufferPointer)
298298
+++ func copy(from:UnsafeMutableRawBufferPointer)
299299
+++ func initializeMemory<Element>(as:Element.Type, at:Int, repeating:Element, count:Int)

0 commit comments

Comments
 (0)