Commit graph

5 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
330bccd659 style: Add an owned slice type which cbindgen can understand.
Passing these by value won't be ok of course, but that's fine.

I plan to combine this with https://github.com/eqrion/cbindgen/pull/333 to
actually be able to share representation for ~all the things, this is just the
first bit.

Box<T>, Atom and Arc<T> will be much easier since cbindgen can understand them
without issues.

It's boxed slices the only ones I should need something like this. I could avoid
it if I rely on Rust's internal representation, which we can per [1], but then I
need to teach cbindgen all about slices, which is generally hard, I think.

[1]: https://github.com/rust-lang/unsafe-code-guidelines/blob/master/reference/src/layout/pointers.md

Differential Revision: https://phabricator.services.mozilla.com/D29768
2019-05-10 12:43:02 +02:00
Emilio Cobos Álvarez
49842f5031 style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
Emilio Cobos Álvarez
8c004c0858 style: Reformat recent changes. 2019-04-12 12:20:14 +02:00
Emilio Cobos Álvarez
0f57b7b833 style: Fix ToResolvedValue implementation for caret-color, and serialize some color properties with Servo.
Differential Revision: https://phabricator.services.mozilla.com/D26785
2019-04-12 12:20:10 +02:00
Emilio Cobos Álvarez
6ac777ebf2 style: Add derive code for a new ToResolvedValue trait, and a few trivial implementations.
Differential Revision: https://phabricator.services.mozilla.com/D26782
2019-04-12 12:20:08 +02:00