mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
committed by
Andrew Trick
parent
c7d33e70d3
commit
c85880899d
@@ -121,7 +121,7 @@ internal func _destroyTLS(_ ptr: UnsafeMutableRawPointer?) {
|
||||
let tlsPtr = ptr!.assumingMemoryBound(to: _ThreadLocalStorage.self)
|
||||
__swift_stdlib_ubrk_close(tlsPtr[0].uBreakIterator)
|
||||
tlsPtr.deinitialize(count: 1)
|
||||
tlsPtr.deallocate(capacity: 1)
|
||||
tlsPtr.deallocate()
|
||||
|
||||
#if INTERNAL_CHECKS_ENABLED
|
||||
// Log the fact we've destroyed our storage
|
||||
@@ -167,4 +167,3 @@ internal func _initializeThreadLocalStorage()
|
||||
_sanityCheck(success == 0, "setspecific failed")
|
||||
return tlsPtr
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user