Commit graph

10 commits

Author SHA1 Message Date
Manish Goregaokar
9812034b96 Regen bindings 2016-10-10 15:34:49 +05:30
Ravi Shankar
2b4d301fbf Import NS_FONT_* constants for font-* glue 2016-10-09 22:40:51 +05:30
bors-servo
cbc857bb78 Auto merge of #13569 - Manishearth:simpliffi, r=emilio
Start simplifying FFI ownership sugar

This is step one of a series of changes planned to make the ownership sugar easier to use. This was blocked on #13038

*very* unsure about second commit. Don't like the thought of accepting types with destructors over FFI. Probably will revert it. Leaving it in for now in case you have some insight.

Eventually at least for the borrowed stuff I want to use T directly (because the crates are merged now), instead of the fake void types. Perhaps for the others too. I might include those changes in this PR -- was originally planning to but I realized that these steps could be split out.

Tentative plan for `Owned` (assuming it's not removed) is to have `Owned<T> <-> Box<T>` (same `T`, no "FFI type") conversions. We will only use ownership wrapper types for things with destructors, and try to keep the conversion simple. I'm envisioning a couple methods for arc/strong and a few more for box/owned. We may need to introduce new wrapper types for gecko-side managed objects (`RefPtr<T>`, `UniquePtr<T>`) but that should be all the wrapper types we have in the ownership sugar.

This PR relies on the guarantee that `Option<&T>` and `Option<Box<T>>` are pointer-sized via the `NonZero` optimization. I am now less unconvinced that this is a good idea 😉.

r? @emilio

cc @mystor

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13569)
<!-- Reviewable:end -->
2016-10-05 00:59:56 -05:00
Manish Goregaokar
b416ccfcae Remove Borrowed<T>/BorrowedMut<T>, use Option<&T> instead. 2016-10-04 15:01:49 +05:30
Ravi Shankar
854258c76e Add NS_FONT_STRETCH_* to bindgen script 2016-10-03 20:40:34 +05:30
bors-servo
7914f14caa Auto merge of #13518 - upsuper:patch-1, r=emilio
Move --use-msvc-mangling out from clang flags.

`--use-msvc-mangling` is not a clang flag, but a flag for bindgen.

r? @emilio

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13518)
<!-- Reviewable:end -->
2016-10-01 09:47:00 -05:00
Xidorn Quan
910853f12a Move --use-msvc-mangling out from clang flags. 2016-09-30 11:09:43 +10:00
Manish Goregaokar
ac80fcf220 Fix indent in regen.py; fix imports 2016-09-28 13:26:16 +02:00
Manish Goregaokar
b2e592b121 Move most of geckolib into style::gecko 2016-09-26 09:07:17 +02:00
Manish Goregaokar
c6787458d9 Move gecko_bindings and gecko_string_cache into the style crate 2016-09-24 19:25:55 +05:30
Renamed from ports/geckolib/binding_tools/regen.py (Browse further)