Skip to content

Use iterators for comment children, attributes, etc. #166

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
emilio opened this issue Oct 29, 2016 · 6 comments
Closed

Use iterators for comment children, attributes, etc. #166

emilio opened this issue Oct 29, 2016 · 6 comments

Comments

@emilio
Copy link
Contributor

emilio commented Oct 29, 2016

It's easier, more efficient, and more readable than all the bound-checking we're doing, specially taking into account that each bound check is an extra ffi call.

@emilio
Copy link
Contributor Author

emilio commented Oct 29, 2016

cc @fitzgen

@jeanphilippeD
Copy link
Contributor

Hello,
I'd quite like to try to do this, for comment children first, since it seems simpler.
Would it be ok?

Would it be reasonable to follow the accepted answer here as a guide?
http://stackoverflow.com/questions/30218886/how-to-implement-iterator-and-intoiterator-for-a-simple-struct

@emilio
Copy link
Contributor Author

emilio commented Oct 30, 2016

Sure, it'd be great!

Yeah, that answer seems pretty reasonable :)

@jeanphilippeD
Copy link
Contributor

Does this issue make #143 redundant?

jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 30, 2016
jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 30, 2016
jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 30, 2016
jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 30, 2016
jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 30, 2016
@emilio
Copy link
Contributor Author

emilio commented Oct 30, 2016

Does this issue make #143 redundant?

Agh, sort of, I didn't read this comment soon enough.

That being said, another contributor had already made progress in that issue, so I think that should be merged. If you could rebase your patch on top of it (should be straight-forward), that would be great :)

@jeanphilippeD
Copy link
Contributor

Yes, that should not be an issue as soon as it is available in master.

jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 30, 2016
jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 30, 2016
jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 31, 2016
jeanphilippeD added a commit to jeanphilippeD/rust-bindgen that referenced this issue Oct 31, 2016
bors-servo pushed a commit that referenced this issue Oct 31, 2016
Use iterators for comment children and attributes fix #166

Fix #166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants