Skip to content

Commit daa0634

Browse files
committed
Rename objc -> objc2
1 parent 7e2868b commit daa0634

File tree

32 files changed

+97
-97
lines changed

32 files changed

+97
-97
lines changed

.travis-disabled.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
# Remove workspace since `rust-test-ios` is not made for that
4343
- rm Cargo.toml
4444
# TODO: env: FEATURES="exception"
45-
script: cd objc && ../rust-test-ios
45+
script: cd objc2 && ../rust-test-ios

objc2/CHANGELOG.md

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

5353
### Fixed
5454

55-
* Fixed the implementation of `objc::runtime` structs so there can't be unsound
55+
* Fixed the implementation of `objc2::runtime` structs so there can't be unsound
5656
references to uninhabited types.
5757

5858
## 0.2.2

objc2/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "objc"
2+
name = "objc2"
33
version = "0.2.7" # Remember to update html_root_url in lib.rs
44
authors = ["Steven Sheldon", "Mads Marquart <[email protected]>"]
55
edition = "2018"
@@ -13,7 +13,7 @@ categories = [
1313
]
1414
readme = "README.md"
1515
repository = "https://github.com/madsmtm/objc2"
16-
documentation = "https://docs.rs/objc/"
16+
documentation = "https://docs.rs/objc2/"
1717
license = "MIT"
1818

1919
exclude = [

objc2/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# `objc`
1+
# `objc2`
22

3-
[![Latest version](https://badgen.net/crates/v/objc)](https://crates.io/crates/objc)
3+
[![Latest version](https://badgen.net/crates/v/objc2)](https://crates.io/crates/objc2)
44
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
5-
[![Documentation](https://docs.rs/objc/badge.svg)](https://docs.rs/objc/)
5+
[![Documentation](https://docs.rs/objc2/badge.svg)](https://docs.rs/objc2/)
66
[![CI Status](https://github.com/madsmtm/objc2/workflows/CI/badge.svg)](https://github.com/madsmtm/objc2/actions)
77

88
Objective-C Runtime bindings and wrapper for Rust.
@@ -12,8 +12,8 @@ Objective-C Runtime bindings and wrapper for Rust.
1212
Objective-C objects can be messaged using the `msg_send!` macro:
1313

1414
```rust , no_run
15-
use objc::{class, msg_send};
16-
use objc::runtime::{BOOL, Object};
15+
use objc2::{class, msg_send};
16+
use objc2::runtime::{BOOL, Object};
1717

1818
let cls = class!(NSObject);
1919
unsafe {
@@ -34,8 +34,8 @@ A `WeakPtr` will not retain the object, but can be upgraded to a `StrongPtr`
3434
and safely fails if the object has been deallocated.
3535

3636
```rust , no_run
37-
use objc::{class, msg_send};
38-
use objc::rc::{autoreleasepool, StrongPtr};
37+
use objc2::{class, msg_send};
38+
use objc2::rc::{autoreleasepool, StrongPtr};
3939

4040
// StrongPtr will release the object when dropped
4141
let obj = unsafe {
@@ -65,9 +65,9 @@ The following example demonstrates declaring a class named `MyNumber` that has
6565
one ivar, a `u32` named `_number` and a `number` method that returns it:
6666

6767
```rust , no_run
68-
use objc::{class, sel};
69-
use objc::declare::ClassDecl;
70-
use objc::runtime::{Object, Sel};
68+
use objc2::{class, sel};
69+
use objc2::declare::ClassDecl;
70+
use objc2::runtime::{Object, Sel};
7171

7272
let superclass = class!(NSObject);
7373
let mut decl = ClassDecl::new("MyNumber", superclass).unwrap();

objc2/examples/introspection.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use objc::rc::StrongPtr;
2-
use objc::runtime::{Class, Object};
3-
use objc::{class, msg_send, sel, Encode};
1+
use objc2::rc::StrongPtr;
2+
use objc2::runtime::{Class, Object};
3+
use objc2::{class, msg_send, sel, Encode};
44

55
fn main() {
66
// Get a class

objc2/src/declare.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ The following example demonstrates declaring a class named `MyNumber` that has
1010
one ivar, a `u32` named `_number` and a `number` method that returns it:
1111
1212
``` no_run
13-
# use objc::{class, sel};
14-
# use objc::declare::ClassDecl;
15-
# use objc::runtime::{Class, Object, Sel};
13+
# use objc2::{class, sel};
14+
# use objc2::declare::ClassDecl;
15+
# use objc2::runtime::{Class, Object, Sel};
1616
let superclass = class!(NSObject);
1717
let mut decl = ClassDecl::new("MyNumber", superclass).unwrap();
1818

objc2/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Objective-C Runtime bindings and wrapper for Rust.
66
Objective-C objects can be messaged using the [`msg_send!`](macro.msg_send!.html) macro:
77
88
``` no_run
9-
# use objc::{class, msg_send};
10-
# use objc::runtime::{BOOL, Class, Object};
9+
# use objc2::{class, msg_send};
10+
# use objc2::runtime::{BOOL, Class, Object};
1111
# unsafe {
1212
let cls = class!(NSObject);
1313
let obj: *mut Object = msg_send![cls, new];
@@ -66,7 +66,7 @@ The bindings can be used on Linux or *BSD utilizing the
6666
#![warn(missing_docs)]
6767
#![allow(clippy::missing_safety_doc)]
6868
// Update in Cargo.toml as well.
69-
#![doc(html_root_url = "https://docs.rs/objc/0.2.7")]
69+
#![doc(html_root_url = "https://docs.rs/objc2/0.2.7")]
7070

7171
extern crate alloc;
7272
extern crate std;

objc2/src/macros.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To check for a class that may not exist, use [`Class::get`].
1313
# Examples
1414
1515
``` no_run
16-
# use objc::class;
16+
# use objc2::class;
1717
let cls = class!(NSObject);
1818
```
1919
*/
@@ -41,7 +41,7 @@ Returns a [`Sel`].
4141
# Examples
4242
4343
```
44-
# use objc::sel;
44+
# use objc2::sel;
4545
let sel = sel!(description);
4646
let sel = sel!(setObject:forKey:);
4747
```
@@ -85,8 +85,8 @@ method's argument's encoding does not match the encoding of the given arguments.
8585
# Examples
8686
8787
``` no_run
88-
# use objc::msg_send;
89-
# use objc::runtime::Object;
88+
# use objc2::msg_send;
89+
# use objc2::runtime::Object;
9090
# unsafe {
9191
let obj: *mut Object;
9292
# let obj: *mut Object = 0 as *mut Object;

objc2/src/message/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ pub unsafe trait Message: RefEncode {
8585
8686
# Example
8787
``` no_run
88-
# use objc::{class, msg_send, sel};
89-
# use objc::runtime::{BOOL, Class, Object};
90-
# use objc::Message;
88+
# use objc2::{class, msg_send, sel};
89+
# use objc2::runtime::{BOOL, Class, Object};
90+
# use objc2::Message;
9191
let obj: &Object;
9292
# obj = unsafe { msg_send![class!(NSObject), new] };
9393
let sel = sel!(isKindOfClass:);

objc2/src/rc/autorelease.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ pub struct AutoreleasePool {
2525
}
2626

2727
/// ```rust,compile_fail
28-
/// use objc::rc::AutoreleasePool;
28+
/// use objc2::rc::AutoreleasePool;
2929
/// fn needs_sync<T: Send>() {}
3030
/// needs_sync::<AutoreleasePool>();
3131
/// ```
3232
/// ```rust,compile_fail
33-
/// use objc::rc::AutoreleasePool;
33+
/// use objc2::rc::AutoreleasePool;
3434
/// fn needs_send<T: Send>() {}
3535
/// needs_send::<AutoreleasePool>();
3636
/// ```
@@ -224,9 +224,9 @@ impl !AutoreleaseSafe for AutoreleasePool {}
224224
/// Basic usage:
225225
///
226226
/// ```rust
227-
/// use objc::{class, msg_send};
228-
/// use objc::rc::{autoreleasepool, AutoreleasePool};
229-
/// use objc::runtime::Object;
227+
/// use objc2::{class, msg_send};
228+
/// use objc2::rc::{autoreleasepool, AutoreleasePool};
229+
/// use objc2::runtime::Object;
230230
///
231231
/// fn needs_lifetime_from_pool<'p>(pool: &'p AutoreleasePool) -> &'p mut Object {
232232
/// let obj: *mut Object = unsafe { msg_send![class!(NSObject), new] };
@@ -247,9 +247,9 @@ impl !AutoreleaseSafe for AutoreleasePool {}
247247
/// safely take it out of the pool:
248248
///
249249
/// ```rust,compile_fail
250-
/// # use objc::{class, msg_send};
251-
/// # use objc::rc::{autoreleasepool, AutoreleasePool};
252-
/// # use objc::runtime::Object;
250+
/// # use objc2::{class, msg_send};
251+
/// # use objc2::rc::{autoreleasepool, AutoreleasePool};
252+
/// # use objc2::runtime::Object;
253253
/// #
254254
/// # fn needs_lifetime_from_pool<'p>(pool: &'p AutoreleasePool) -> &'p mut Object {
255255
/// # let obj: *mut Object = unsafe { msg_send![class!(NSObject), new] };
@@ -272,9 +272,9 @@ impl !AutoreleaseSafe for AutoreleasePool {}
272272
not(feature = "unstable_autoreleasesafe"),
273273
doc = "```rust,should_panic"
274274
)]
275-
/// # use objc::{class, msg_send};
276-
/// # use objc::rc::{autoreleasepool, AutoreleasePool};
277-
/// # use objc::runtime::Object;
275+
/// # use objc2::{class, msg_send};
276+
/// # use objc2::rc::{autoreleasepool, AutoreleasePool};
277+
/// # use objc2::runtime::Object;
278278
/// #
279279
/// # fn needs_lifetime_from_pool<'p>(pool: &'p AutoreleasePool) -> &'p mut Object {
280280
/// # let obj: *mut Object = unsafe { msg_send![class!(NSObject), new] };

0 commit comments

Comments
 (0)