Skip to content

Commit 1894030

Browse files
authored
Merge pull request swiftlang#1334 from ianpartridge/nslock-warning
2 parents 4942458 + 301961d commit 1894030

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Foundation/NSLock.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,12 @@ private func timeSpecFrom(date: Date) -> timespec? {
303303

304304
private func deallocateTimedLockData(cond: _PthreadCondPointer, mutex: _PthreadMutexPointer) {
305305
pthread_cond_destroy(cond)
306-
cond.deinitialize()
307-
cond.deallocate(capacity: 1)
306+
cond.deinitialize(count: 1)
307+
cond.deallocate()
308308

309309
pthread_mutex_destroy(mutex)
310-
mutex.deinitialize()
311-
mutex.deallocate(capacity: 1)
310+
mutex.deinitialize(count: 1)
311+
mutex.deallocate()
312312
}
313313

314314
// Emulate pthread_mutex_timedlock using pthread_cond_timedwait.

0 commit comments

Comments
 (0)