Skip to content

Commit c6dc521

Browse files
committed
Use objc2::ffi::{NSInteger, NSUInteger}
This now means that `NSInteger = isize` and `NSUInteger = usize`
1 parent 036c3de commit c6dc521

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

cocoa-foundation/src/foundation.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,8 @@ use block::Block;
1616
use libc;
1717
use objc2_encode::{Encode, Encoding, RefEncode};
1818

19+
pub use objc2::ffi::{NSInteger, NSUInteger, NSIntegerMax};
1920

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

3323
const UTF8_ENCODING: usize = 4;

0 commit comments

Comments
 (0)