implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods

This commit is contained in:
taylor swift
2017-11-06 14:40:15 -06:00
committed by Andrew Trick
parent c7d33e70d3
commit c85880899d
42 changed files with 561 additions and 263 deletions

View File

@@ -184,8 +184,8 @@ dump(randomUnsafeMutablePointerString)
var sanePointerString = UnsafeMutablePointer<String>.allocate(capacity: 1)
sanePointerString.initialize(to: "Hello panda")
dump(sanePointerString.pointee)
sanePointerString.deinitialize()
sanePointerString.deallocate(capacity: 1)
sanePointerString.deinitialize(count: 1)
sanePointerString.deallocate()
// Don't crash on types with opaque metadata. rdar://problem/19791252
// CHECK-NEXT: (Opaque Value)
@@ -194,4 +194,3 @@ dump(rawPointer)
// CHECK-LABEL: and now our song is done
print("and now our song is done")