Bug 1291863: Add some type replacements to fix the Servo binding generation. r=bholley

MozReview-Commit-ID: 63eXtp2otFa
This commit is contained in:
Emilio Cobos Álvarez 2016-08-03 13:22:00 -07:00
parent 5d8a772fcd
commit e09cb4a0e8

View File

@ -3823,6 +3823,30 @@ STATIC_ASSERT_FIELD_OFFSET_MATCHES(nsRect, nsRect_Simple, y);
STATIC_ASSERT_FIELD_OFFSET_MATCHES(nsRect, nsRect_Simple, width); STATIC_ASSERT_FIELD_OFFSET_MATCHES(nsRect, nsRect_Simple, width);
STATIC_ASSERT_FIELD_OFFSET_MATCHES(nsRect, nsRect_Simple, height); STATIC_ASSERT_FIELD_OFFSET_MATCHES(nsRect, nsRect_Simple, height);
/**
* <div rustbindgen="true" replaces="nsSize">
*/
struct nsSize_Simple {
nscoord width, height;
};
STATIC_ASSERT_TYPE_LAYOUTS_MATCH(nsSize, nsSize_Simple);
STATIC_ASSERT_FIELD_OFFSET_MATCHES(nsSize, nsSize_Simple, width);
STATIC_ASSERT_FIELD_OFFSET_MATCHES(nsSize, nsSize_Simple, height);
/**
* <div rustbindgen="true" replaces="UniquePtr">
*
* TODO(Emilio): This is a workaround and we should be able to get rid of this
* one.
*/
template<typename T, typename Deleter = mozilla::DefaultDelete<T>>
struct UniquePtr_Simple {
T* mPtr;
};
STATIC_ASSERT_TYPE_LAYOUTS_MATCH(mozilla::UniquePtr<int>, UniquePtr_Simple<int>);
/** /**
* <div rustbindgen replaces="nsTArray"></div> * <div rustbindgen replaces="nsTArray"></div>
*/ */