Skip to content

Commit 9abe6e7

Browse files
authored
Merge pull request #75 from jordanekay/swift/3.0
Update for Xcode 8 beta 4
2 parents 8b937b6 + bdebc52 commit 9abe6e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SwiftTask/_RecursiveLock.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ internal final class _RecursiveLock
1515

1616
internal init()
1717
{
18-
self.mutex = UnsafeMutablePointer<pthread_mutex_t>(allocatingCapacity: 1)
19-
self.attribute = UnsafeMutablePointer<pthread_mutexattr_t>(allocatingCapacity: 1)
18+
self.mutex = UnsafeMutablePointer<pthread_mutex_t>.allocate(capacity: 1)
19+
self.attribute = UnsafeMutablePointer<pthread_mutexattr_t>.allocate(capacity: 1)
2020

2121
pthread_mutexattr_init(self.attribute)
2222
pthread_mutexattr_settype(self.attribute, PTHREAD_MUTEX_RECURSIVE)
@@ -28,8 +28,8 @@ internal final class _RecursiveLock
2828
pthread_mutexattr_destroy(self.attribute)
2929
pthread_mutex_destroy(self.mutex)
3030

31-
self.attribute.deallocateCapacity(1)
32-
self.mutex.deallocateCapacity(1)
31+
self.attribute.deallocate(capacity: 1)
32+
self.mutex.deallocate(capacity: 1)
3333
}
3434

3535
internal func lock()

0 commit comments

Comments
 (0)