diff --git a/objc2-foundation-sys/src/generated_others_shim.rs b/objc2-foundation-sys/src/generated_others_shim.rs index d80031f31..bcb42adec 100644 --- a/objc2-foundation-sys/src/generated_others_shim.rs +++ b/objc2-foundation-sys/src/generated_others_shim.rs @@ -3,14 +3,17 @@ use core::mem::ManuallyDrop; use core::ptr::NonNull; -use std::os::raw::{c_char, c_int, c_longlong, c_schar, c_ulong, c_ushort, c_void}; - use objc2::ffi::{NSInteger, NSUInteger}; use objc2::rc::{Id, Unknown}; -use objc2::runtime::{Bool, Object}; +use objc2::runtime::Object; use objc2::{class, msg_send, Encoding, Message, RefEncode}; -use crate::{Autoreleased, NSCoder, NSObject, NSRange, NSString}; +use crate::{Autoreleased, NSCoder, NSObject, NSRange}; + +pub const NSComparisonResult_NSOrderedAscending: NSComparisonResult = -1; +pub const NSComparisonResult_NSOrderedSame: NSComparisonResult = 0; +pub const NSComparisonResult_NSOrderedDescending: NSComparisonResult = 1; +pub type NSComparisonResult = NSInteger; #[repr(transparent)] pub struct NSArray(NSObject); diff --git a/objc2-foundation/src/comparison_result.rs b/objc2-foundation/src/comparison_result.rs index 1c6f1ec94..260805d1f 100644 --- a/objc2-foundation/src/comparison_result.rs +++ b/objc2-foundation/src/comparison_result.rs @@ -2,12 +2,14 @@ use core::cmp::Ordering; use objc2::{Encode, Encoding, RefEncode}; +use crate::ffi; + #[repr(isize)] // NSInteger #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub enum NSComparisonResult { - Ascending = -1, - Same = 0, - Descending = 1, + Ascending = ffi::NSComparisonResult_NSOrderedAscending, + Same = ffi::NSComparisonResult_NSOrderedSame, + Descending = ffi::NSComparisonResult_NSOrderedDescending, } impl Default for NSComparisonResult {