Skip to content
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 possibility to iterate untyped CFArray #154

Merged
merged 1 commit into from Jan 27, 2018

Conversation

@faern
Copy link
Contributor

faern commented Jan 27, 2018

Maybe it was intentional, or maybe it was forgotten. But it is not possible to iterate an untyped array (CFArray<*const c_void>) in the 0.5.1 release, it was in 0.4.

This extra FromVoid impl on *const c_void fixes that.


This change is Reviewable

@faern
Copy link
Contributor Author

faern commented Jan 27, 2018

I ran into problems when upgrading rust-font-loader to use the 0.5 branch of core-foundation. It tries to iterate and map on an untyped array.

EDIT: I fixed it in rust-font-loader by correctly typing the array. So that is fine. But it should still be possible to just iterate the *const c_void pointers if one wants to I guess?

@jrmuizel
Copy link
Collaborator

jrmuizel commented Jan 27, 2018

This looks good to me.

@jdm
Copy link
Member

jdm commented Jan 27, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Jan 27, 2018

📌 Commit dc9392c has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jan 27, 2018

Testing commit dc9392c with merge f062dcb...

bors-servo added a commit that referenced this pull request Jan 27, 2018
Add possibility to iterate untyped CFArray

Maybe it was intentional, or maybe it was forgotten. But it is not possible to iterate an untyped array (`CFArray<*const c_void>`) in the `0.5.1` release, it was in `0.4`.

This extra `FromVoid` impl on `*const c_void` fixes that.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-foundation-rs/154)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 27, 2018

☀️ Test successful - status-travis
Approved by: jdm
Pushing f062dcb to master...

@bors-servo bors-servo merged commit dc9392c into servo:master Jan 27, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@faern faern deleted the faern:iterate-untyped-array branch Jan 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.