Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename `size_of_is_0!` as `malloc_size_of_is_0!`. #18932

Merged
merged 1 commit into from Oct 18, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Rename `size_of_is_0!` as `malloc_size_of_is_0!`.

The new name makes it clearer that it comes from the `malloc_size_of`
crate.
  • Loading branch information
nnethercote committed Oct 18, 2017
commit a26d25db12ad25276df16362a1a4e7ab33347952
@@ -415,7 +415,7 @@ impl<T: MallocSizeOf, U> MallocSizeOf for euclid::TypedSize2D<T, U> {

/// For use on types where size_of() returns 0.
#[macro_export]
macro_rules! size_of_is_0(
macro_rules! malloc_size_of_is_0(
($($ty:ty),+) => (
$(
impl $crate::MallocSizeOf for $ty {
@@ -438,14 +438,14 @@ macro_rules! size_of_is_0(
);
);

size_of_is_0!(bool, char, str);
size_of_is_0!(u8, u16, u32, u64, usize);
size_of_is_0!(i8, i16, i32, i64, isize);
size_of_is_0!(f32, f64);
malloc_size_of_is_0!(bool, char, str);
malloc_size_of_is_0!(u8, u16, u32, u64, usize);
malloc_size_of_is_0!(i8, i16, i32, i64, isize);
malloc_size_of_is_0!(f32, f64);

size_of_is_0!(Range<u8>, Range<u16>, Range<u32>, Range<u64>, Range<usize>);
size_of_is_0!(Range<i8>, Range<i16>, Range<i32>, Range<i64>, Range<isize>);
size_of_is_0!(Range<f32>, Range<f64>);
malloc_size_of_is_0!(Range<u8>, Range<u16>, Range<u32>, Range<u64>, Range<usize>);
malloc_size_of_is_0!(Range<i8>, Range<i16>, Range<i32>, Range<i64>, Range<isize>);
malloc_size_of_is_0!(Range<f32>, Range<f64>);

size_of_is_0!(app_units::Au);
size_of_is_0!(cssparser::RGBA, cssparser::TokenSerializationType);
malloc_size_of_is_0!(app_units::Au);
malloc_size_of_is_0!(cssparser::RGBA, cssparser::TokenSerializationType);
@@ -389,4 +389,4 @@ impl From<*mut nsAtom> for Atom {
}
}

size_of_is_0!(Atom);
malloc_size_of_is_0!(Atom);
@@ -72,7 +72,7 @@ pub mod system_colors {

// It's hard to implement MallocSizeOf for LookAndFeel_ColorID because it
// is a bindgen type. So we implement it on the typedef instead.
size_of_is_0!(SystemColor);
malloc_size_of_is_0!(SystemColor);

impl ToCss for SystemColor {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.