Skip to content

Commit

Permalink
Use proper name of objc2_encode
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jul 20, 2022
1 parent 088bde8 commit c506e7d
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion cocoa-foundation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ core-foundation = { path = "../core-foundation", version = "0.9" }
core-graphics-types = { path = "../core-graphics-types", version = "0.1" }
foreign-types = "0.3"
objc2 = { version = "=0.3.0-beta.1" }
objc-encode = { version = "=2.0.0-pre.1", package = "objc2-encode" }
objc2-encode = { version = "=2.0.0-pre.1" }
4 changes: 2 additions & 2 deletions cocoa-foundation/src/foundation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::os::raw::c_void;
use base::{id, BOOL, NO, SEL, nil};
use block::Block;
use libc;
use objc_encode::{Encode, Encoding, RefEncode};
use objc2_encode::{Encode, Encoding, RefEncode};


#[cfg(target_pointer_width = "32")]
Expand All @@ -38,7 +38,7 @@ mod macos {
use base::id;
use core_graphics_types::base::CGFloat;
use core_graphics_types::geometry::CGRect;
use objc_encode::{Encode, Encoding};
use objc2_encode::{Encode, Encoding};

#[repr(C)]
#[derive(Copy, Clone)]
Expand Down
8 changes: 4 additions & 4 deletions cocoa-foundation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ extern crate core_foundation;
extern crate core_graphics_types;
extern crate foreign_types;
extern crate libc;
pub extern crate objc_encode;
pub extern crate objc2_encode;
#[macro_use]
extern crate objc2;

pub use objc_encode as __objc_encode;
pub use objc2_encode as __objc2_encode;

#[macro_export]
macro_rules! impl_Encode {
($t:ty, $delegation:ty) => {
unsafe impl $crate::__objc_encode::Encode for $t {
const ENCODING: $crate::__objc_encode::Encoding<'static> = <$delegation>::ENCODING;
unsafe impl $crate::__objc2_encode::Encode for $t {
const ENCODING: $crate::__objc2_encode::Encoding<'static> = <$delegation>::ENCODING;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cocoa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ core-foundation = { path = "../core-foundation", version = "0.9" }
core-graphics = { path = "../core-graphics", version = "0.22" }
foreign-types = "0.3"
objc2 = { version = "=0.3.0-beta.1" }
objc-encode = { version = "=2.0.0-pre.1", package = "objc2-encode" }
objc2-encode = { version = "=2.0.0-pre.1" }
2 changes: 1 addition & 1 deletion cocoa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern crate core_graphics;
extern crate cocoa_foundation;
extern crate foreign_types;
extern crate libc;
extern crate objc_encode;
extern crate objc2_encode;
#[macro_use]
extern crate objc2;

Expand Down
18 changes: 9 additions & 9 deletions cocoa/src/quartzcore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1667,8 +1667,8 @@ pub struct CATransform3D {
pub m41: CGFloat, pub m42: CGFloat, pub m43: CGFloat, pub m44: CGFloat,
}

unsafe impl ::objc_encode::Encode for CATransform3D {
const ENCODING: ::objc_encode::Encoding<'static> = ::objc_encode::Encoding::Array(16, &CGFloat::ENCODING);
unsafe impl ::objc2_encode::Encode for CATransform3D {
const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Array(16, &CGFloat::ENCODING);
}

impl PartialEq for CATransform3D {
Expand Down Expand Up @@ -1823,8 +1823,8 @@ pub struct CVTimeStamp {
pub reserved: u64,
}

unsafe impl ::objc_encode::Encode for CVTimeStamp {
const ENCODING: ::objc_encode::Encoding<'static> = ::objc_encode::Encoding::Struct(
unsafe impl ::objc2_encode::Encode for CVTimeStamp {
const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Struct(
"CVTimeStamp",
&[
u32::ENCODING,
Expand All @@ -1840,9 +1840,9 @@ unsafe impl ::objc_encode::Encode for CVTimeStamp {
);
}

unsafe impl ::objc_encode::RefEncode for CVTimeStamp {
const ENCODING_REF: ::objc_encode::Encoding<'static> =
::objc_encode::Encoding::Pointer(&<Self as ::objc_encode::Encode>::ENCODING);
unsafe impl ::objc2_encode::RefEncode for CVTimeStamp {
const ENCODING_REF: ::objc2_encode::Encoding<'static> =
::objc2_encode::Encoding::Pointer(&<Self as ::objc2_encode::Encode>::ENCODING);
}

pub type CVTimeStampFlags = u64;
Expand Down Expand Up @@ -1873,8 +1873,8 @@ pub struct CVSMPTETime {
pub frames: i16,
}

unsafe impl ::objc_encode::Encode for CVSMPTETime {
const ENCODING: ::objc_encode::Encoding<'static> = ::objc_encode::Encoding::Struct(
unsafe impl ::objc2_encode::Encode for CVSMPTETime {
const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Struct(
"CVSMPTETime",
&[
i16::ENCODING,
Expand Down
2 changes: 1 addition & 1 deletion core-foundation-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = ["The Servo Project Developers"]
license = "MIT / Apache-2.0"

[dependencies]
objc-encode = { version = "=2.0.0-pre.1", package = "objc2-encode" }
objc2-encode = { version = "=2.0.0-pre.1" }

[features]
mac_os_10_7_support = [] # backwards compatibility
Expand Down
4 changes: 2 additions & 2 deletions core-foundation-sys/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ pub struct __CFArray(c_void);
pub type CFArrayRef = *const __CFArray;
pub type CFMutableArrayRef = *mut __CFArray;

unsafe impl ::objc_encode::RefEncode for __CFArray {
const ENCODING_REF: ::objc_encode::Encoding<'static> = ::objc_encode::Encoding::Object;
unsafe impl ::objc2_encode::RefEncode for __CFArray {
const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object;
}

extern {
Expand Down
4 changes: 2 additions & 2 deletions core-foundation-sys/src/attributed_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pub struct __CFAttributedString(c_void);
pub type CFAttributedStringRef = *const __CFAttributedString;
pub type CFMutableAttributedStringRef = *const __CFAttributedString;

unsafe impl ::objc_encode::RefEncode for __CFAttributedString {
const ENCODING_REF: ::objc_encode::Encoding<'static> = ::objc_encode::Encoding::Object;
unsafe impl ::objc2_encode::RefEncode for __CFAttributedString {
const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object;
}

extern {
Expand Down
4 changes: 2 additions & 2 deletions core-foundation-sys/src/dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ pub struct __CFDictionary(c_void);
pub type CFDictionaryRef = *const __CFDictionary;
pub type CFMutableDictionaryRef = *mut __CFDictionary;

unsafe impl ::objc_encode::RefEncode for __CFDictionary {
const ENCODING_REF: ::objc_encode::Encoding<'static> = ::objc_encode::Encoding::Object;
unsafe impl ::objc2_encode::RefEncode for __CFDictionary {
const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object;
}

extern {
Expand Down
2 changes: 1 addition & 1 deletion core-foundation-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#![cfg_attr(all(feature="mac_os_10_7_support", feature="mac_os_10_8_features"), feature(linkage))] // back-compat requires weak linkage

extern crate objc_encode;
extern crate objc2_encode;

// Link to CoreFoundation on any Apple device.
//
Expand Down
4 changes: 2 additions & 2 deletions core-foundation-sys/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ pub struct __CFString(c_void);

pub type CFStringRef = *const __CFString;

unsafe impl ::objc_encode::RefEncode for __CFString {
const ENCODING_REF: ::objc_encode::Encoding<'static> = ::objc_encode::Encoding::Object;
unsafe impl ::objc2_encode::RefEncode for __CFString {
const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object;
}

extern {
Expand Down
2 changes: 1 addition & 1 deletion core-graphics-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bitflags = "1.0"
core-foundation = { path = "../core-foundation", version = "0.9" }
foreign-types = "0.3.0"
libc = "0.2"
objc-encode = { version = "=2.0.0-pre.1", package = "objc2-encode" }
objc2-encode = { version = "=2.0.0-pre.1" }

[package.metadata.docs.rs]
default-target = "x86_64-apple-darwin"
2 changes: 1 addition & 1 deletion core-graphics-types/src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use base::CGFloat;
use core_foundation::base::TCFType;
use core_foundation::dictionary::CFDictionary;
use objc_encode::{Encode, Encoding};
use objc2_encode::{Encode, Encoding};

pub const CG_ZERO_POINT: CGPoint = CGPoint {
x: 0.0,
Expand Down
2 changes: 1 addition & 1 deletion core-graphics-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

extern crate libc;
extern crate core_foundation;
extern crate objc_encode;
extern crate objc2_encode;

pub mod base;
pub mod geometry;
2 changes: 1 addition & 1 deletion core-graphics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ core-foundation = { path = "../core-foundation", version = "0.9" }
core-graphics-types = { path = "../core-graphics-types", version = "0.1" }
foreign-types = "0.3.0"
libc = "0.2"
objc-encode = { version = "=2.0.0-pre.1", package = "objc2-encode" }
objc2-encode = { version = "=2.0.0-pre.1" }

[package.metadata.docs.rs]
default-target = "x86_64-apple-darwin"
2 changes: 1 addition & 1 deletion core-graphics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// except according to those terms.

extern crate libc;
extern crate objc_encode;
extern crate objc2_encode;

#[macro_use]
extern crate core_foundation;
Expand Down
2 changes: 1 addition & 1 deletion core-graphics/src/sys.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::os::raw::c_void;

use objc_encode::{Encoding, RefEncode};
use objc2_encode::{Encoding, RefEncode};

pub enum CGImage {}
pub type CGImageRef = *mut CGImage;
Expand Down

0 comments on commit c506e7d

Please sign in to comment.