Skip to content

Commit f886250

Browse files
committed
Prepare for moving objc2-foundation
1 parent 769ea10 commit f886250

16 files changed

+37
-25
lines changed

objc2-foundation/src/__string_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use core::sync::atomic::{AtomicPtr, Ordering};
1717
use objc2::rc::Id;
1818
use objc2::runtime::Class;
1919

20-
use crate::NSString;
20+
use super::NSString;
2121

2222
// This is defined in CoreFoundation, but we don't emit a link attribute
2323
// here because it is already linked via Foundation.

objc2-foundation/src/array.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ use objc2::runtime::{Class, Object};
99
use objc2::Message;
1010
use objc2::{msg_send, msg_send_id};
1111

12-
use crate::{
12+
use super::{
1313
NSCopying, NSEnumerator, NSFastEnumeration, NSFastEnumerator, NSMutableArray, NSMutableCopying,
14-
NSObject, NSRange, __inner_extern_class,
14+
NSObject, NSRange,
1515
};
16+
use crate::__inner_extern_class;
1617

1718
__inner_extern_class! {
1819
/// TODO

objc2-foundation/src/attributed_string.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use objc2::rc::{DefaultId, Id, Shared};
55
use objc2::runtime::Object;
66
use objc2::{msg_send, msg_send_id};
77

8-
use crate::{
9-
extern_class, NSCopying, NSDictionary, NSMutableAttributedString, NSMutableCopying, NSObject,
10-
NSString,
8+
use super::{
9+
NSCopying, NSDictionary, NSMutableAttributedString, NSMutableCopying, NSObject, NSString,
1110
};
11+
use crate::extern_class;
1212

1313
extern_class! {
1414
/// A string that has associated attributes for portions of its text.

objc2-foundation/src/data.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use objc2::rc::{DefaultId, Id, Shared};
1010
use objc2::runtime::{Class, Object};
1111
use objc2::{msg_send, msg_send_id};
1212

13-
use crate::{extern_class, NSCopying, NSMutableCopying, NSMutableData, NSObject};
13+
use super::{NSCopying, NSMutableCopying, NSMutableData, NSObject};
14+
use crate::extern_class;
1415

1516
extern_class! {
1617
/// A static byte buffer in memory.

objc2-foundation/src/dictionary.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ use core::ptr;
99
use objc2::rc::{DefaultId, Id, Owned, Shared, SliceId};
1010
use objc2::{msg_send, msg_send_id, Message};
1111

12-
use super::{NSArray, NSCopying, NSEnumerator, NSFastEnumeration, NSObject, __inner_extern_class};
12+
use super::{NSArray, NSCopying, NSEnumerator, NSFastEnumeration, NSObject};
13+
use crate::__inner_extern_class;
1314

1415
__inner_extern_class! {
1516
#[derive(PartialEq, Eq, Hash)]

objc2-foundation/src/exception.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ use objc2::rc::{Id, Shared};
77
use objc2::runtime::Object;
88
use objc2::{msg_send, msg_send_id, sel};
99

10-
use crate::{extern_class, NSCopying, NSDictionary, NSObject, NSString};
10+
use super::{NSCopying, NSDictionary, NSObject, NSString};
11+
use crate::extern_class;
1112

1213
extern_class! {
1314
/// A special condition that interrupts the normal flow of program

objc2-foundation/src/mutable_array.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ use objc2::rc::{DefaultId, Id, Owned, Ownership, Shared, SliceId};
99
use objc2::Message;
1010
use objc2::{msg_send, msg_send_id};
1111

12-
use crate::array::from_refs;
13-
use crate::{
12+
use super::array::from_refs;
13+
use super::{
1414
NSArray, NSComparisonResult, NSCopying, NSFastEnumeration, NSFastEnumerator, NSMutableCopying,
15-
NSObject, __inner_extern_class,
15+
NSObject,
1616
};
17+
use crate::__inner_extern_class;
1718

1819
__inner_extern_class! {
1920
// TODO: Ensure that this deref to NSArray is safe!

objc2-foundation/src/mutable_attributed_string.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ use core::fmt;
33
use objc2::rc::{DefaultId, Id, Owned, Shared};
44
use objc2::{msg_send, msg_send_id};
55

6-
use crate::{extern_class, NSAttributedString, NSCopying, NSMutableCopying, NSObject, NSString};
6+
use super::{NSAttributedString, NSCopying, NSMutableCopying, NSObject, NSString};
7+
use crate::extern_class;
78

89
extern_class! {
910
/// A mutable string that has associated attributes.

objc2-foundation/src/mutable_data.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ use std::io;
99
use objc2::rc::{DefaultId, Id, Owned, Shared};
1010
use objc2::{msg_send, msg_send_id};
1111

12-
use crate::data::data_with_bytes;
13-
use crate::{extern_class, NSCopying, NSData, NSMutableCopying, NSObject, NSRange};
12+
use super::data::data_with_bytes;
13+
use super::{NSCopying, NSData, NSMutableCopying, NSObject, NSRange};
14+
use crate::extern_class;
1415

1516
extern_class! {
1617
/// A dynamic byte buffer in memory.
@@ -36,7 +37,7 @@ impl NSMutableData {
3637

3738
#[cfg(feature = "block")]
3839
pub fn from_vec(bytes: Vec<u8>) -> Id<Self, Owned> {
39-
unsafe { Id::new(crate::data::data_from_vec(Self::class(), bytes).cast()).unwrap() }
40+
unsafe { Id::new(super::data::data_from_vec(Self::class(), bytes).cast()).unwrap() }
4041
}
4142

4243
// TODO: Use malloc_buf/mbox and `initWithBytesNoCopy:...`?

objc2-foundation/src/mutable_string.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use core::str;
66
use objc2::rc::{DefaultId, Id, Owned, Shared};
77
use objc2::{msg_send, msg_send_id};
88

9-
use crate::{extern_class, NSCopying, NSMutableCopying, NSObject, NSString};
9+
use super::{NSCopying, NSMutableCopying, NSObject, NSString};
10+
use crate::extern_class;
1011

1112
extern_class! {
1213
/// A dynamic plain-text Unicode string object.

0 commit comments

Comments
 (0)