-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add iteratorsize #47
Add iteratorsize #47
Conversation
Looks like this worked. |
@@ -98,7 +98,7 @@ end | |||
Base.start(it::XMLAttrIter) = it.p | |||
Base.done(it::XMLAttrIter, p::Xptr) = (p == C_NULL) | |||
Base.next(it::XMLAttrIter, p::Xptr) = (a = XMLAttr(p); (a, a._struct.next)) | |||
|
|||
iteratorsize(::Type{XMLAttrIter})=SizeUnknown() | |||
|
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.
spaces around the =
Thanks! |
Cool. |
Good to hear - I could've sworn you had a base PR merged by now. If this thing with |
There is something I don't get here: what is the point of defining a fallback |
@mschauer Good point. I copied it direct from Iterators.jl When I was doing so, it was on the logic that if However that does not follow, because multiple dispatch is most specific first. So it could just be:
|
This should fix it with v0.5 of Julia. Re: all iterators are broken.
To be honest I haven't tested this version directly, am doing a quick commit and am relying on TravisCI to test it. If this doesn't CI I'll do a more careful branch and fix.
This problem is referenced in #46 (comment)
See: JuliaLang/julia#15977 and the linked documentation gist