From 766ff20cc83b80bbd39661bc63568bf350595008 Mon Sep 17 00:00:00 2001 From: Johannes Weiss Date: Mon, 18 Mar 2019 17:41:13 +0000 Subject: [PATCH] explicitly mark functions on internal types as internal (for jazzy) (#11) --- Sources/Logging/Locks.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/Logging/Locks.swift b/Sources/Logging/Locks.swift index 694bdd5..bbe1751 100644 --- a/Sources/Logging/Locks.swift +++ b/Sources/Logging/Locks.swift @@ -66,7 +66,7 @@ extension Lock { /// - Parameter body: The block to execute while holding the lock. /// - Returns: The value returned by the block. @inlinable - public func withLock(_ body: () throws -> T) rethrows -> T { + internal func withLock(_ body: () throws -> T) rethrows -> T { self.lock() defer { self.unlock() @@ -76,7 +76,7 @@ extension Lock { // specialise Void return (for performance) @inlinable - public func withLockVoid(_ body: () throws -> Void) rethrows { + internal func withLockVoid(_ body: () throws -> Void) rethrows { try self.withLock(body) } } @@ -139,7 +139,7 @@ extension ReadWriteLock { /// - Parameter body: The block to execute while holding the lock. /// - Returns: The value returned by the block. @inlinable - public func withReaderLock(_ body: () throws -> T) rethrows -> T { + internal func withReaderLock(_ body: () throws -> T) rethrows -> T { self.lockRead() defer { self.unlock() @@ -156,7 +156,7 @@ extension ReadWriteLock { /// - Parameter body: The block to execute while holding the lock. /// - Returns: The value returned by the block. @inlinable - public func withWriterLock(_ body: () throws -> T) rethrows -> T { + internal func withWriterLock(_ body: () throws -> T) rethrows -> T { self.lockWrite() defer { self.unlock() @@ -166,13 +166,13 @@ extension ReadWriteLock { // specialise Void return (for performance) @inlinable - public func withReaderLockVoid(_ body: () throws -> Void) rethrows { + internal func withReaderLockVoid(_ body: () throws -> Void) rethrows { try self.withReaderLock(body) } // specialise Void return (for performance) @inlinable - public func withWriterLockVoid(_ body: () throws -> Void) rethrows { + internal func withWriterLockVoid(_ body: () throws -> Void) rethrows { try self.withWriterLock(body) } }