Skip to content

Changed the NSOrderedSet to use NSMutableArray and NSMutableSet internally #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sgl0v
Copy link
Contributor

@sgl0v sgl0v commented May 24, 2016

NSOrderedSet API contains lots of methods similar to the ones we have in NSSet & NSArray. I'd consider using these collections instead of the Swift ones in the NSOrderedSet/NSMutabeOrderedSet implementation.

public func enumerateObjectsWithOptions(_ opts: NSEnumerationOptions, usingBlock block: (AnyObject, Int, UnsafeMutablePointer<ObjCBool>) -> Void) { NSUnimplemented() }
public func enumerateObjectsAtIndexes(_ s: NSIndexSet, options opts: NSEnumerationOptions, usingBlock block: (AnyObject, Int, UnsafeMutablePointer<ObjCBool>) -> Void) { NSUnimplemented() }
public var array: [AnyObject] {
return _orderedStorage.bridge()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably good enough for now, because it's busted on Darwin too - but note that the comment here describes this class as returning a proxy object for this method and also set. The bridge does a copy, so no proxying is happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I didn't come up with any solution here. Thus return just a copy of the array/set. Will work on implementing other NSOrderedSet methods and think over about improving these ones then.

@parkera
Copy link
Contributor

parkera commented May 28, 2016

@swift-ci please test

@parkera
Copy link
Contributor

parkera commented Jul 20, 2016

Unfortunately this became out of date. Is it possible to rebase?

@parkera parkera assigned parkera and unassigned parkera Jul 20, 2016
@sgl0v
Copy link
Contributor Author

sgl0v commented Sep 21, 2016

Finally did rebase on current master branch.

@alblue
Copy link
Contributor

alblue commented Oct 5, 2017

This has gone stale. Please rebase and reopen if necessary.

@alblue alblue closed this Oct 5, 2017
kateinoigakukun pushed a commit to kateinoigakukun/swift-corelibs-foundation that referenced this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants