Skip to content

Commit 3ecd5e8

Browse files
committed
Use objc2::ffi::{NSInteger, NSUInteger}
This now means that `NSInteger = isize` and `NSUInteger = usize`
1 parent 6d16668 commit 3ecd5e8

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

cocoa-foundation/src/foundation.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,8 @@ use block::Block;
1717
use libc;
1818
use objc2_encode::{Encode, Encoding, RefEncode};
1919

20+
pub use objc2::ffi::{NSInteger, NSUInteger, NSIntegerMax};
2021

21-
#[cfg(target_pointer_width = "32")]
22-
pub type NSInteger = libc::c_int;
23-
#[cfg(target_pointer_width = "32")]
24-
pub type NSUInteger = libc::c_uint;
25-
26-
#[cfg(target_pointer_width = "64")]
27-
pub type NSInteger = libc::c_long;
28-
#[cfg(target_pointer_width = "64")]
29-
pub type NSUInteger = libc::c_ulong;
30-
31-
pub const NSIntegerMax: NSInteger = NSInteger::max_value();
3222
pub const NSNotFound: NSInteger = NSIntegerMax;
3323

3424
const UTF8_ENCODING: usize = 4;

0 commit comments

Comments
 (0)