File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -138,10 +138,10 @@ internal var forceWindowsPaths: Bool {
138138
139139#if ENABLE_MOCKING
140140// Strip the mock_system prefix and the arg list suffix
141- private func originalSyscallName( _ s : String ) -> String {
141+ private func originalSyscallName( _ function : String ) -> String {
142142 // `function` must be of format `system_<name>(<parameters>)`
143- precondition ( s . starts ( with: " system_ " ) )
144- return String ( s . dropFirst ( " system_ " . count) . prefix { $0. isLetter } )
143+ precondition ( function . starts ( with: " system_ " ) )
144+ return String ( function . dropFirst ( " system_ " . count) . prefix { $0 != " ( " } )
145145}
146146
147147private func mockImpl(
Original file line number Diff line number Diff line change @@ -102,14 +102,14 @@ internal func system_pwrite(
102102 return pwrite ( fd, buf, nbyte, offset)
103103}
104104
105- public func system_dup( _ fd: Int32 ) -> Int32 {
105+ internal func system_dup( _ fd: Int32 ) -> Int32 {
106106 #if ENABLE_MOCKING
107107 if mockingEnabled { return _mock ( fd) }
108108 #endif
109109 return dup ( fd)
110110}
111111
112- public func system_dup2( _ fd: Int32 , _ fd2: Int32 ) -> Int32 {
112+ internal func system_dup2( _ fd: Int32 , _ fd2: Int32 ) -> Int32 {
113113 #if ENABLE_MOCKING
114114 if mockingEnabled { return _mock ( fd, fd2) }
115115 #endif
You can’t perform that action at this time.
0 commit comments