Skip to content

Commit a0b6427

Browse files
committed
[stdlib] _NSDictionary: Replace getObjects:andKeys: with getObjects:andKeys:count:
(cherry picked from commit 93ab767)
1 parent f9fa824 commit a0b6427

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

stdlib/public/core/Dictionary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ internal func _stdlib_NSDictionary_allKeys(_ nsd: _NSDictionary)
16231623
let storage = _HeapBuffer<Int, AnyObject>(
16241624
_HeapBufferStorage<Int, AnyObject>.self, count, count)
16251625

1626-
nsd.getObjects(nil, andKeys: storage.baseAddress)
1626+
nsd.getObjects(nil, andKeys: storage.baseAddress, count: count)
16271627
return storage
16281628
}
16291629
#endif

stdlib/public/core/ShadowProtocols.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ public protocol _NSDictionaryCore :
129129
public protocol _NSDictionary : _NSDictionaryCore {
130130
// Note! This API's type is different from what is imported by the clang
131131
// importer.
132-
func getObjects(_ objects: UnsafeMutablePointer<AnyObject>?,
133-
andKeys keys: UnsafeMutablePointer<AnyObject>?)
134-
}
132+
func getObjects(
133+
_ objects: UnsafeMutablePointer<AnyObject>?,
134+
andKeys keys: UnsafeMutablePointer<AnyObject>?,
135+
count: Int)
136+
}
135137

136138
/// A shadow for the "core operations" of NSSet.
137139
///

0 commit comments

Comments
 (0)