Skip to content

Commit 9e4af8b

Browse files
committed
whitespace: tabs instead of spaces
1 parent 6cf8450 commit 9e4af8b

File tree

1 file changed

+32
-39
lines changed

1 file changed

+32
-39
lines changed

src/swift/Wrapper.swift

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -168,112 +168,105 @@ extension DispatchSource : DispatchSourceProcess,
168168
#endif
169169

170170
public protocol DispatchSourceType {
171-
#if false // crashes the swift compiler
172-
typealias DispatchSourceHandler = @convention(block) () -> Void
171+
#if false /* FIXME: crashes the swift compiler */
172+
typealias DispatchSourceHandler = @convention(block) () -> Void
173173

174-
func setEventHandler(handler: DispatchSourceHandler?)
174+
func setEventHandler(handler: DispatchSourceHandler?)
175175

176-
func setCancelHandler(handler: DispatchSourceHandler?)
176+
func setCancelHandler(handler: DispatchSourceHandler?)
177177

178-
func setRegistrationHandler(handler: DispatchSourceHandler?)
178+
func setRegistrationHandler(handler: DispatchSourceHandler?)
179179
#endif
180-
func cancel()
180+
func cancel()
181181

182-
func resume()
182+
func resume()
183183

184-
func suspend()
184+
func suspend()
185185

186-
var handle: UInt { get }
186+
var handle: UInt { get }
187187

188-
var mask: UInt { get }
188+
var mask: UInt { get }
189189

190-
var data: UInt { get }
190+
var data: UInt { get }
191191

192-
var isCancelled: Bool { get }
192+
var isCancelled: Bool { get }
193193
}
194194

195195
public protocol DispatchSourceUserDataAdd : DispatchSourceType {
196-
func mergeData(value: UInt)
196+
func mergeData(value: UInt)
197197
}
198198

199199
public protocol DispatchSourceUserDataOr {
200200
#if false /*FIXME: clashes with UserDataAdd?? */
201-
func mergeData(value: UInt)
201+
func mergeData(value: UInt)
202202
#endif
203203
}
204204

205205
#if HAVE_MACH
206206
public protocol DispatchSourceMachSend : DispatchSourceType {
207+
public var handle: mach_port_t { get }
207208

208-
public var handle: mach_port_t { get }
209-
210-
public var data: DispatchSource.MachSendEvent { get }
211-
212-
public var mask: DispatchSource.MachSendEvent { get }
209+
public var data: DispatchSource.MachSendEvent { get }
213210

211+
public var mask: DispatchSource.MachSendEvent { get }
214212
}
215213
#endif
216214

217215
#if HAVE_MACH
218216
public protocol DispatchSourceMachReceive : DispatchSourceType {
219-
var handle: mach_port_t { get }
217+
var handle: mach_port_t { get }
220218
}
221219
#endif
222220

223221
#if HAVE_MACH
224222
public protocol DispatchSourceMemoryPressure : DispatchSourceType {
223+
public var data: DispatchSource.MemoryPressureEvent { get }
225224

226-
public var data: DispatchSource.MemoryPressureEvent { get }
227-
228-
public var mask: DispatchSource.MemoryPressureEvent { get }
229-
225+
public var mask: DispatchSource.MemoryPressureEvent { get }
230226
}
231227
#endif
232228

233229
#if !os(Linux)
234230
public protocol DispatchSourceProcess : DispatchSourceType {
235-
var handle: pid_t { get }
231+
var handle: pid_t { get }
236232

237-
var data: DispatchSource.ProcessEvent { get }
233+
var data: DispatchSource.ProcessEvent { get }
238234

239-
var mask: DispatchSource.ProcessEvent { get }
235+
var mask: DispatchSource.ProcessEvent { get }
240236
}
241237
#endif
242238

243239
public protocol DispatchSourceRead : DispatchSourceType {
244-
245240
}
246241

247242
public protocol DispatchSourceSignal : DispatchSourceType {
248-
249243
}
250244

251245
public protocol DispatchSourceTimer : DispatchSourceType {
252-
func setTimer(start: DispatchTime, leeway: DispatchTimeInterval)
246+
func setTimer(start: DispatchTime, leeway: DispatchTimeInterval)
253247

254-
func setTimer(walltime start: DispatchWallTime, leeway: DispatchTimeInterval)
248+
func setTimer(walltime start: DispatchWallTime, leeway: DispatchTimeInterval)
255249

256-
func setTimer(start: DispatchTime, interval: DispatchTimeInterval, leeway: DispatchTimeInterval)
250+
func setTimer(start: DispatchTime, interval: DispatchTimeInterval, leeway: DispatchTimeInterval)
257251

258-
func setTimer(start: DispatchTime, interval: Double, leeway: DispatchTimeInterval)
252+
func setTimer(start: DispatchTime, interval: Double, leeway: DispatchTimeInterval)
259253

260-
func setTimer(walltime start: DispatchWallTime, interval: DispatchTimeInterval, leeway: DispatchTimeInterval)
254+
func setTimer(walltime start: DispatchWallTime, interval: DispatchTimeInterval, leeway: DispatchTimeInterval)
261255

262-
func setTimer(walltime start: DispatchWallTime, interval: Double, leeway: DispatchTimeInterval)
256+
func setTimer(walltime start: DispatchWallTime, interval: Double, leeway: DispatchTimeInterval)
263257
}
264258

265259
#if !os(Linux)
266260
public protocol DispatchSourceFileSystemObject : DispatchSourceType {
267-
var handle: Int32 { get }
261+
var handle: Int32 { get }
268262

269-
var data: DispatchSource.FileSystemEvent { get }
263+
var data: DispatchSource.FileSystemEvent { get }
270264

271-
var mask: DispatchSource.FileSystemEvent { get }
265+
var mask: DispatchSource.FileSystemEvent { get }
272266
}
273267
#endif
274268

275269
public protocol DispatchSourceWrite : DispatchSourceType {
276-
277270
}
278271

279272

0 commit comments

Comments
 (0)