Skip to content

Commit 745951a

Browse files
committed
Rename sugar::refptr to sugar::ownership
1 parent 40dfcc6 commit 745951a

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

components/style/gecko_conversions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use app_units::Au;
1212
use gecko_bindings::bindings::{RawServoStyleSheet, ServoComputedValues};
1313
use gecko_bindings::structs::nsStyleCoord_CalcValue;
14-
use gecko_bindings::sugar::refptr::{HasArcFFI, HasFFI};
14+
use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI};
1515
use properties::ComputedValues;
1616
use stylesheets::Stylesheet;
1717
use values::computed::{CalcLengthOrPercentage, LengthOrPercentage};

ports/geckolib/binding_tools/regen.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,25 +323,25 @@ def build(objdir, target_name, debug, debugger, kind_name=None,
323323
flags.append("--blacklist-type")
324324
flags.append("{}Strong".format(ty))
325325
flags.append("--raw-line")
326-
flags.append("pub type {0}Strong = ::sugar::refptr::Strong<{0}>;".format(ty))
326+
flags.append("pub type {0}Strong = ::sugar::ownership::Strong<{0}>;".format(ty))
327327
flags.append("--blacklist-type")
328328
flags.append("{}Borrowed".format(ty))
329329
flags.append("--raw-line")
330-
flags.append("pub type {0}Borrowed<'a> = ::sugar::refptr::Borrowed<'a, {0}>;".format(ty))
330+
flags.append("pub type {0}Borrowed<'a> = ::sugar::ownership::Borrowed<'a, {0}>;".format(ty))
331331
if "servo_owned_types" in current_target:
332332
for ty in current_target["servo_owned_types"]:
333-
flags.append("-blacklist-type")
333+
flags.append("--blacklist-type")
334334
flags.append("{}Borrowed".format(ty))
335-
flags.append("-raw-line")
335+
flags.append("--raw-line")
336336
flags.append("pub type {0}Borrowed<'a> = &'a {0};".format(ty))
337-
flags.append("-blacklist-type")
337+
flags.append("--blacklist-type")
338338
flags.append("{}BorrowedMut".format(ty))
339-
flags.append("-raw-line")
339+
flags.append("--raw-line")
340340
flags.append("pub type {0}BorrowedMut<'a> = &'a mut {0};".format(ty))
341-
flags.append("-blacklist-type")
341+
flags.append("--blacklist-type")
342342
flags.append("{}Owned".format(ty))
343-
flags.append("-raw-line")
344-
flags.append("pub type {0}Owned = ::sugar::refptr::Owned<{0}>;".format(ty))
343+
flags.append("--raw-line")
344+
flags.append("pub type {0}Owned = ::sugar::ownership::Owned<{0}>;".format(ty))
345345
if "structs_types" in current_target:
346346
for ty in current_target["structs_types"]:
347347
ty_fragments = ty.split("::")

ports/geckolib/data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use euclid::size::TypedSize2D;
66
use gecko_bindings::bindings::RawServoStyleSet;
7-
use gecko_bindings::sugar::refptr::{HasBoxFFI, HasFFI, HasSimpleFFI};
7+
use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
88
use num_cpus;
99
use std::cmp;
1010
use std::collections::HashMap;

ports/geckolib/gecko_bindings/bindings.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ pub enum nsINode {}
55
pub enum nsIDocument {}
66
pub enum nsIPrincipal {}
77
pub enum nsIURI {}
8-
pub type ServoComputedValuesStrong = ::sugar::refptr::Strong<ServoComputedValues>;
9-
pub type ServoComputedValuesBorrowed<'a> = ::sugar::refptr::Borrowed<'a, ServoComputedValues>;
10-
pub type RawServoStyleSheetStrong = ::sugar::refptr::Strong<RawServoStyleSheet>;
11-
pub type RawServoStyleSheetBorrowed<'a> = ::sugar::refptr::Borrowed<'a, RawServoStyleSheet>;
12-
pub type ServoDeclarationBlockStrong = ::sugar::refptr::Strong<ServoDeclarationBlock>;
13-
pub type ServoDeclarationBlockBorrowed<'a> = ::sugar::refptr::Borrowed<'a, ServoDeclarationBlock>;
8+
pub type ServoComputedValuesStrong = ::sugar::ownership::Strong<ServoComputedValues>;
9+
pub type ServoComputedValuesBorrowed<'a> = ::sugar::ownership::Borrowed<'a, ServoComputedValues>;
10+
pub type RawServoStyleSheetStrong = ::sugar::ownership::Strong<RawServoStyleSheet>;
11+
pub type RawServoStyleSheetBorrowed<'a> = ::sugar::ownership::Borrowed<'a, RawServoStyleSheet>;
12+
pub type ServoDeclarationBlockStrong = ::sugar::ownership::Strong<ServoDeclarationBlock>;
13+
pub type ServoDeclarationBlockBorrowed<'a> = ::sugar::ownership::Borrowed<'a, ServoDeclarationBlock>;
1414
pub type RawServoStyleSetBorrowed<'a> = &'a RawServoStyleSet;
1515
pub type RawServoStyleSetBorrowedMut<'a> = &'a mut RawServoStyleSet;
16-
pub type RawServoStyleSetOwned = ::sugar::refptr::Owned<RawServoStyleSet>;
16+
pub type RawServoStyleSetOwned = ::sugar::ownership::Owned<RawServoStyleSet>;
1717
use structs::nsStyleFont;
1818
unsafe impl Send for nsStyleFont {}
1919
unsafe impl Sync for nsStyleFont {}

ports/geckolib/gecko_bindings/sugar/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ mod ns_css_shadow_array;
66
mod ns_style_auto_array;
77
pub mod ns_style_coord;
88
mod ns_t_array;
9-
pub mod refptr;
9+
pub mod ownership;

ports/geckolib/glue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
2020
use gecko_bindings::structs::ServoElementSnapshot;
2121
use gecko_bindings::structs::nsRestyleHint;
2222
use gecko_bindings::structs::{SheetParsingMode, nsIAtom};
23-
use gecko_bindings::sugar::refptr::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
24-
use gecko_bindings::sugar::refptr::{HasSimpleFFI, HasFFI, Strong};
23+
use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
24+
use gecko_bindings::sugar::ownership::{HasSimpleFFI, HasFFI, Strong};
2525
use gecko_string_cache::Atom;
2626
use snapshot::GeckoElementSnapshot;
2727
use std::mem::transmute;

ports/geckolib/wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsEle
2525
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
2626
use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO};
2727
use gecko_bindings::structs::{nsIAtom, nsChangeHint, nsStyleContext};
28-
use gecko_bindings::sugar::refptr::FFIArcHelpers;
28+
use gecko_bindings::sugar::ownership::FFIArcHelpers;
2929
use gecko_string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
3030
use glue::GeckoDeclarationBlock;
3131
use libc::uintptr_t;

0 commit comments

Comments
 (0)