Skip to content

Commit acdb29d

Browse files
committed
add message about @objc_block
1 parent 0c3e25e commit acdb29d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SwiftIO/SocketAckMap.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
import Foundation
2626

27+
// @objc_block is undocumented, but is used because Swift assumes that all
28+
// Objective-C blocks are copied, but Objective-C assumes that Swift will copy it.
29+
// And the way things are done here, the bridging fails to copy the block in
30+
// SocketAckMap#addAck
2731
public typealias AckCallback = @objc_block (NSArray?) -> Void
2832
public typealias OnAckCallback = (timeout:UInt64, callback:AckCallback) -> Void
2933

0 commit comments

Comments
 (0)