-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implementation of NSCountedSet #88
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
Conversation
@parkera Updated pull request to resolve the conflicts. Please have a look. |
unfortunately this causes a SIL gen crasher on linux:
|
Thanks @phausler . Do not have linux machine will try to arrange something and run the code. Thanks for reviewing. Do you know the reason? |
I am not certain on why, we have had a few of these beasts lurking under the waters around NSSet and NSDictionary specifically when it comes to implementing initializers that take arrays |
@phausler @parkera Getting the errors while building swift on ubuntu 15.10 http://pastebin.com/9b9ubyit . Any idea? |
You'll need to make sure your Linux machine has lots (> 8 GB) of RAM in order for linking to finish. If it fails like that, you can also just try again. |
Also, pass -R to the build script - the release version of clang/swift uses less memory to link. |
Thanks @parkera !! Do not have that much RAM also running in VMWare :( . Will try to arrange somewhere else :( |
434bca0
to
27a3b3d
Compare
The general idea here is ok, but I have one major concern. The implementation limits itself to holding subclasses of NSObject. This is actually not required even on Darwin: class Foo { }
let f = Foo()
var x = NSCountedSet()
x.addObject(f)
x.addObject(f)
x.addObject(f)
x.count // 1
x.countForObject(f) // 3 This may be one area where we are again bumping up against the difficulties of lacking a bridging story while maintaining cross-platform source compatibility... |
@parkera @phausler Updated the pull request to resolve conflicts. Verified test are passing. Please review it. |
Hi @phausler |
@phausler It's pending for while. Can you please review it. If you need any changes please let me know. |
let v2 = "v2".bridge() | ||
let v3asv1 = "v1".bridge() | ||
let set = NSCountedSet() | ||
let set2 = NSCountedSet(array: [v1, v1, v2,v3asv1].bridge().bridge()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the double bridge here is probably not needed since the elements in the Array are of type NSString which should fit as AnyObject.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phausler Thanks. Done the changes.
@parkera this looks good to me, do you have any outstanding issues here? |
@phausler Updated the pull request to address the comments. Thanks for reviewing it. |
Implementation of NSCountedSet
Thanks! |
[editors] Add alternative swift syntax spec to sublime config
[pull] swiftwasm from master
This pull request contains the implementation of
NSCountedSet
. It includes implementation and test cases forNSCountedSet
. Please let me know if you need any changes in this. Suggestion are welcome. I am not that much expert with system implementation. So please let me know your views or any other changes required.Thanks to swift team