File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -269,9 +269,12 @@ public func _stringForPrintObject(_ value: Any) -> String {
269269public func _debuggerTestingCheckExpect( _: String , _: String ) { }
270270
271271// Utilities to get refcount(s) of class objects.
272- @_silgen_name ( " swift_retainCount " )
273- public func _getRetainCount( _ Value: AnyObject ) -> UInt
274- @_silgen_name ( " swift_unownedRetainCount " )
275- public func _getUnownedRetainCount( _ Value: AnyObject ) -> UInt
276- @_silgen_name ( " swift_weakRetainCount " )
277- public func _getWeakRetainCount( _ Value: AnyObject ) -> UInt
272+ public func _getRetainCount( _ Value: AnyObject ) -> UInt {
273+ return UInt ( bitPattern: swift_retainCount ( unsafeBitCast ( Value, to: UnsafeMutablePointer< HeapObject> . self ) ) )
274+ }
275+ public func _getUnownedRetainCount( _ Value: AnyObject ) -> UInt {
276+ return UInt ( bitPattern: swift_unownedRetainCount ( unsafeBitCast ( Value, to: UnsafeMutablePointer< HeapObject> . self ) ) )
277+ }
278+ public func _getWeakRetainCount( _ Value: AnyObject ) -> UInt {
279+ return UInt ( bitPattern: swift_weakRetainCount ( unsafeBitCast ( Value, to: UnsafeMutablePointer< HeapObject> . self ) ) )
280+ }
You can’t perform that action at this time.
0 commit comments