From 3ecd5e8f9928c63d06828ab228cf6d169cefa042 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 16 Jun 2022 03:09:29 +0200 Subject: [PATCH] Use objc2::ffi::{NSInteger, NSUInteger} This now means that `NSInteger = isize` and `NSUInteger = usize` --- cocoa-foundation/src/foundation.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/cocoa-foundation/src/foundation.rs b/cocoa-foundation/src/foundation.rs index c63c3ac8..08dada1e 100644 --- a/cocoa-foundation/src/foundation.rs +++ b/cocoa-foundation/src/foundation.rs @@ -17,18 +17,8 @@ use block::Block; use libc; use objc2_encode::{Encode, Encoding, RefEncode}; +pub use objc2::ffi::{NSInteger, NSUInteger, NSIntegerMax}; -#[cfg(target_pointer_width = "32")] -pub type NSInteger = libc::c_int; -#[cfg(target_pointer_width = "32")] -pub type NSUInteger = libc::c_uint; - -#[cfg(target_pointer_width = "64")] -pub type NSInteger = libc::c_long; -#[cfg(target_pointer_width = "64")] -pub type NSUInteger = libc::c_ulong; - -pub const NSIntegerMax: NSInteger = NSInteger::max_value(); pub const NSNotFound: NSInteger = NSIntegerMax; const UTF8_ENCODING: usize = 4;