mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
stylo: Fix nsCOMPtr release bindings.
This commit is contained in:
parent
81f273b66f
commit
29c52cc61b
4 changed files with 13 additions and 9 deletions
|
@ -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 _
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue