mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Rename sugar::refptr to sugar::ownership
This commit is contained in:
parent
8bed07292c
commit
36c63db5d4
8 changed files with 22 additions and 22 deletions
|
@ -11,7 +11,7 @@
|
|||
use app_units::Au;
|
||||
use gecko_bindings::bindings::{RawServoStyleSheet, ServoComputedValues};
|
||||
use gecko_bindings::structs::nsStyleCoord_CalcValue;
|
||||
use gecko_bindings::sugar::refptr::{HasArcFFI, HasFFI};
|
||||
use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI};
|
||||
use properties::ComputedValues;
|
||||
use stylesheets::Stylesheet;
|
||||
use values::computed::{CalcLengthOrPercentage, LengthOrPercentage};
|
||||
|
|
|
@ -323,25 +323,25 @@ def build(objdir, target_name, debug, debugger, kind_name=None,
|
|||
flags.append("--blacklist-type")
|
||||
flags.append("{}Strong".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}Strong = ::sugar::refptr::Strong<{0}>;".format(ty))
|
||||
flags.append("pub type {0}Strong = ::sugar::ownership::Strong<{0}>;".format(ty))
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}Borrowed".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}Borrowed<'a> = ::sugar::refptr::Borrowed<'a, {0}>;".format(ty))
|
||||
flags.append("pub type {0}Borrowed<'a> = ::sugar::ownership::Borrowed<'a, {0}>;".format(ty))
|
||||
if "servo_owned_types" in current_target:
|
||||
for ty in current_target["servo_owned_types"]:
|
||||
flags.append("-blacklist-type")
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}Borrowed".format(ty))
|
||||
flags.append("-raw-line")
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}Borrowed<'a> = &'a {0};".format(ty))
|
||||
flags.append("-blacklist-type")
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}BorrowedMut".format(ty))
|
||||
flags.append("-raw-line")
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}BorrowedMut<'a> = &'a mut {0};".format(ty))
|
||||
flags.append("-blacklist-type")
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}Owned".format(ty))
|
||||
flags.append("-raw-line")
|
||||
flags.append("pub type {0}Owned = ::sugar::refptr::Owned<{0}>;".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}Owned = ::sugar::ownership::Owned<{0}>;".format(ty))
|
||||
if "structs_types" in current_target:
|
||||
for ty in current_target["structs_types"]:
|
||||
ty_fragments = ty.split("::")
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use euclid::size::TypedSize2D;
|
||||
use gecko_bindings::bindings::RawServoStyleSet;
|
||||
use gecko_bindings::sugar::refptr::{HasBoxFFI, HasFFI, HasSimpleFFI};
|
||||
use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
|
||||
use num_cpus;
|
||||
use std::cmp;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -5,15 +5,15 @@ pub enum nsINode {}
|
|||
pub enum nsIDocument {}
|
||||
pub enum nsIPrincipal {}
|
||||
pub enum nsIURI {}
|
||||
pub type ServoComputedValuesStrong = ::sugar::refptr::Strong<ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowed<'a> = ::sugar::refptr::Borrowed<'a, ServoComputedValues>;
|
||||
pub type RawServoStyleSheetStrong = ::sugar::refptr::Strong<RawServoStyleSheet>;
|
||||
pub type RawServoStyleSheetBorrowed<'a> = ::sugar::refptr::Borrowed<'a, RawServoStyleSheet>;
|
||||
pub type ServoDeclarationBlockStrong = ::sugar::refptr::Strong<ServoDeclarationBlock>;
|
||||
pub type ServoDeclarationBlockBorrowed<'a> = ::sugar::refptr::Borrowed<'a, ServoDeclarationBlock>;
|
||||
pub type ServoComputedValuesStrong = ::sugar::ownership::Strong<ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowed<'a> = ::sugar::ownership::Borrowed<'a, ServoComputedValues>;
|
||||
pub type RawServoStyleSheetStrong = ::sugar::ownership::Strong<RawServoStyleSheet>;
|
||||
pub type RawServoStyleSheetBorrowed<'a> = ::sugar::ownership::Borrowed<'a, RawServoStyleSheet>;
|
||||
pub type ServoDeclarationBlockStrong = ::sugar::ownership::Strong<ServoDeclarationBlock>;
|
||||
pub type ServoDeclarationBlockBorrowed<'a> = ::sugar::ownership::Borrowed<'a, ServoDeclarationBlock>;
|
||||
pub type RawServoStyleSetBorrowed<'a> = &'a RawServoStyleSet;
|
||||
pub type RawServoStyleSetBorrowedMut<'a> = &'a mut RawServoStyleSet;
|
||||
pub type RawServoStyleSetOwned = ::sugar::refptr::Owned<RawServoStyleSet>;
|
||||
pub type RawServoStyleSetOwned = ::sugar::ownership::Owned<RawServoStyleSet>;
|
||||
use structs::nsStyleFont;
|
||||
unsafe impl Send for nsStyleFont {}
|
||||
unsafe impl Sync for nsStyleFont {}
|
||||
|
|
|
@ -6,4 +6,4 @@ mod ns_css_shadow_array;
|
|||
mod ns_style_auto_array;
|
||||
pub mod ns_style_coord;
|
||||
mod ns_t_array;
|
||||
pub mod refptr;
|
||||
pub mod ownership;
|
||||
|
|
|
@ -20,8 +20,8 @@ use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
|
|||
use gecko_bindings::structs::ServoElementSnapshot;
|
||||
use gecko_bindings::structs::nsRestyleHint;
|
||||
use gecko_bindings::structs::{SheetParsingMode, nsIAtom};
|
||||
use gecko_bindings::sugar::refptr::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
|
||||
use gecko_bindings::sugar::refptr::{HasSimpleFFI, HasFFI, Strong};
|
||||
use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
|
||||
use gecko_bindings::sugar::ownership::{HasSimpleFFI, HasFFI, Strong};
|
||||
use gecko_string_cache::Atom;
|
||||
use snapshot::GeckoElementSnapshot;
|
||||
use std::mem::transmute;
|
||||
|
|
|
@ -25,7 +25,7 @@ use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsEle
|
|||
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
|
||||
use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO};
|
||||
use gecko_bindings::structs::{nsIAtom, nsChangeHint, nsStyleContext};
|
||||
use gecko_bindings::sugar::refptr::FFIArcHelpers;
|
||||
use gecko_bindings::sugar::ownership::FFIArcHelpers;
|
||||
use gecko_string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
use glue::GeckoDeclarationBlock;
|
||||
use libc::uintptr_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue