Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMark TypedRect as repr(C) #216
Conversation
|
@bors-servo r+ |
|
|
Mark TypedRect as repr(C) TypedPoint2D and TypedSize2D are both repr(C) so TypedRect can be marked repr(C). This helps improve the FFI interface for WebRender. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/216) <!-- Reviewable:end -->
|
Thanks! |
|
|
|
@nical I hate to say it, but isn't adding |
|
I don't think so. As long as there is no repr specified the representation isn't defined, so code that relies on the representation is already technically invalid. It could have been a breaking change if the type already had an explicit repr and we had changed it. |
|
@nical It would be nice to get a version with this used by webrender, so it can make its way over to gecko eventually. Not sure how much work that is, it's not urgent. |
|
I think that the only thing we need to do is bump euclid to 0.15.1 and have webrender depend on 0.15.1 instead of 0.15.0 (since there was no breaking change as far as I can tell). |
Bump version to 0.15.1 This is for getting #216 into webrender. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/218) <!-- Reviewable:end -->
eqrion commentedJun 21, 2017
•
edited by larsbergstrom
TypedPoint2D and TypedSize2D are both repr(C) so TypedRect can be marked repr(C). This helps improve the FFI interface for WebRender.
This change is