stylo: Fix nsCOMPtr release bindings.

This commit is contained in:
Emilio Cobos Álvarez 2017-05-08 22:07:12 +02:00
parent 81f273b66f
commit 29c52cc61b
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 13 additions and 9 deletions

View file

@ -6,18 +6,20 @@
use gecko_bindings::structs::nsCOMPtr;
#[cfg(feature = "gecko_debug")]
impl<T> nsCOMPtr<T> {
/// Get this pointer as a raw pointer.
#[cfg(feature = "gecko_debug")]
#[inline]
pub fn raw(&self) -> *mut T {
pub fn raw<U>(&self) -> *mut T {
self.mRawPtr
}
}
#[cfg(not(feature = "gecko_debug"))]
impl nsCOMPtr {
/// Get this pointer as a raw pointer.
#[cfg(not(feature = "gecko_debug"))]
#[inline]
pub fn raw(&self) -> *mut T {
pub fn raw<T>(&self) -> *mut T {
self._base.mRawPtr as *mut _
}
}