//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_0?language=objc)
pub const NSFoundationVersionNumber10_0: c_float = 397.40;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_1?language=objc)
pub const NSFoundationVersionNumber10_1: c_float = 425.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_1_1?language=objc)
pub const NSFoundationVersionNumber10_1_1: c_float = 425.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_1_2?language=objc)
pub const NSFoundationVersionNumber10_1_2: c_float = 425.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_1_3?language=objc)
pub const NSFoundationVersionNumber10_1_3: c_float = 425.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_1_4?language=objc)
pub const NSFoundationVersionNumber10_1_4: c_float = 425.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2?language=objc)
pub const NSFoundationVersionNumber10_2: c_float = 462.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2_1?language=objc)
pub const NSFoundationVersionNumber10_2_1: c_float = 462.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2_2?language=objc)
pub const NSFoundationVersionNumber10_2_2: c_float = 462.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2_3?language=objc)
pub const NSFoundationVersionNumber10_2_3: c_float = 462.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2_4?language=objc)
pub const NSFoundationVersionNumber10_2_4: c_float = 462.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2_5?language=objc)
pub const NSFoundationVersionNumber10_2_5: c_float = 462.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2_6?language=objc)
pub const NSFoundationVersionNumber10_2_6: c_float = 462.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2_7?language=objc)
pub const NSFoundationVersionNumber10_2_7: c_float = 462.70;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_2_8?language=objc)
pub const NSFoundationVersionNumber10_2_8: c_float = 462.70;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3?language=objc)
pub const NSFoundationVersionNumber10_3: c_float = 500.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_1?language=objc)
pub const NSFoundationVersionNumber10_3_1: c_float = 500.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_2?language=objc)
pub const NSFoundationVersionNumber10_3_2: c_float = 500.30;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_3?language=objc)
pub const NSFoundationVersionNumber10_3_3: c_float = 500.54;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_4?language=objc)
pub const NSFoundationVersionNumber10_3_4: c_float = 500.56;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_5?language=objc)
pub const NSFoundationVersionNumber10_3_5: c_float = 500.56;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_6?language=objc)
pub const NSFoundationVersionNumber10_3_6: c_float = 500.56;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_7?language=objc)
pub const NSFoundationVersionNumber10_3_7: c_float = 500.56;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_8?language=objc)
pub const NSFoundationVersionNumber10_3_8: c_float = 500.56;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_3_9?language=objc)
pub const NSFoundationVersionNumber10_3_9: c_float = 500.58;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4?language=objc)
pub const NSFoundationVersionNumber10_4: c_float = 567.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_1?language=objc)
pub const NSFoundationVersionNumber10_4_1: c_float = 567.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_2?language=objc)
pub const NSFoundationVersionNumber10_4_2: c_float = 567.12;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_3?language=objc)
pub const NSFoundationVersionNumber10_4_3: c_float = 567.21;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_4_intel?language=objc)
pub const NSFoundationVersionNumber10_4_4_Intel: c_float = 567.23;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_4_powerpc?language=objc)
pub const NSFoundationVersionNumber10_4_4_PowerPC: c_float = 567.21;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_5?language=objc)
pub const NSFoundationVersionNumber10_4_5: c_float = 567.25;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_6?language=objc)
pub const NSFoundationVersionNumber10_4_6: c_float = 567.26;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_7?language=objc)
pub const NSFoundationVersionNumber10_4_7: c_float = 567.27;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_8?language=objc)
pub const NSFoundationVersionNumber10_4_8: c_float = 567.28;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_9?language=objc)
pub const NSFoundationVersionNumber10_4_9: c_float = 567.29;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_10?language=objc)
pub const NSFoundationVersionNumber10_4_10: c_float = 567.29;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_4_11?language=objc)
pub const NSFoundationVersionNumber10_4_11: c_float = 567.36;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5?language=objc)
pub const NSFoundationVersionNumber10_5: c_float = 677.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5_1?language=objc)
pub const NSFoundationVersionNumber10_5_1: c_float = 677.10;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5_2?language=objc)
pub const NSFoundationVersionNumber10_5_2: c_float = 677.15;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5_3?language=objc)
pub const NSFoundationVersionNumber10_5_3: c_float = 677.19;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5_4?language=objc)
pub const NSFoundationVersionNumber10_5_4: c_float = 677.19;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5_5?language=objc)
pub const NSFoundationVersionNumber10_5_5: c_float = 677.21;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5_6?language=objc)
pub const NSFoundationVersionNumber10_5_6: c_float = 677.22;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5_7?language=objc)
pub const NSFoundationVersionNumber10_5_7: c_float = 677.24;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_5_8?language=objc)
pub const NSFoundationVersionNumber10_5_8: c_float = 677.26;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6?language=objc)
pub const NSFoundationVersionNumber10_6: c_float = 751.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6_1?language=objc)
pub const NSFoundationVersionNumber10_6_1: c_float = 751.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6_2?language=objc)
pub const NSFoundationVersionNumber10_6_2: c_float = 751.14;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6_3?language=objc)
pub const NSFoundationVersionNumber10_6_3: c_float = 751.21;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6_4?language=objc)
pub const NSFoundationVersionNumber10_6_4: c_float = 751.29;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6_5?language=objc)
pub const NSFoundationVersionNumber10_6_5: c_float = 751.42;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6_6?language=objc)
pub const NSFoundationVersionNumber10_6_6: c_float = 751.53;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6_7?language=objc)
pub const NSFoundationVersionNumber10_6_7: c_float = 751.53;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_6_8?language=objc)
pub const NSFoundationVersionNumber10_6_8: c_float = 751.62;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_7?language=objc)
pub const NSFoundationVersionNumber10_7: c_float = 833.10;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_7_1?language=objc)
pub const NSFoundationVersionNumber10_7_1: c_float = 833.10;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_7_2?language=objc)
pub const NSFoundationVersionNumber10_7_2: c_float = 833.20;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_7_3?language=objc)
pub const NSFoundationVersionNumber10_7_3: c_float = 833.24;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_7_4?language=objc)
pub const NSFoundationVersionNumber10_7_4: c_float = 833.25;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_8?language=objc)
pub const NSFoundationVersionNumber10_8: c_float = 945.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_8_1?language=objc)
pub const NSFoundationVersionNumber10_8_1: c_float = 945.00;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_8_2?language=objc)
pub const NSFoundationVersionNumber10_8_2: c_float = 945.11;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_8_3?language=objc)
pub const NSFoundationVersionNumber10_8_3: c_float = 945.16;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_8_4?language=objc)
pub const NSFoundationVersionNumber10_8_4: c_float = 945.18;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_9?language=objc)
pub const NSFoundationVersionNumber10_9: c_uint = 1056;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_9_1?language=objc)
pub const NSFoundationVersionNumber10_9_1: c_uint = 1056;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_9_2?language=objc)
pub const NSFoundationVersionNumber10_9_2: c_float = 1056.13;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_10?language=objc)
pub const NSFoundationVersionNumber10_10: c_float = 1151.16;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_10_1?language=objc)
pub const NSFoundationVersionNumber10_10_1: c_float = 1151.16;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_10_2?language=objc)
pub const NSFoundationVersionNumber10_10_2: c_float = 1152.14;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_10_3?language=objc)
pub const NSFoundationVersionNumber10_10_3: c_float = 1153.20;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_10_4?language=objc)
pub const NSFoundationVersionNumber10_10_4: c_float = 1153.20;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_10_5?language=objc)
pub const NSFoundationVersionNumber10_10_5: c_uint = 1154;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_10_max?language=objc)
pub const NSFoundationVersionNumber10_10_Max: c_uint = 1199;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_11?language=objc)
pub const NSFoundationVersionNumber10_11: c_uint = 1252;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_11_1?language=objc)
pub const NSFoundationVersionNumber10_11_1: c_float = 1255.1;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_11_2?language=objc)
pub const NSFoundationVersionNumber10_11_2: c_float = 1256.1;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_11_3?language=objc)
pub const NSFoundationVersionNumber10_11_3: c_float = 1256.1;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_11_4?language=objc)
pub const NSFoundationVersionNumber10_11_4: c_uint = 1258;
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber10_11_max?language=objc)
pub const NSFoundationVersionNumber10_11_Max: c_uint = 1299;
extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsfoundationversionnumber?language=objc)
    pub static NSFoundationVersionNumber: c_double;
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsexceptionname?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
#[cfg(feature = "NSString")]
pub type NSExceptionName = NSString;

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsrunloopmode?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
#[cfg(feature = "NSString")]
pub type NSRunLoopMode = NSString;

#[cfg(feature = "NSString")]
impl NSString {
    /// # Safety
    ///
    /// `a_selector` must be a valid selector.
    #[doc(alias = "NSStringFromSelector")]
    #[cfg(feature = "NSString")]
    #[inline]
    pub unsafe fn from_selector(a_selector: Sel) -> Retained<NSString> {
        extern "C-unwind" {
            fn NSStringFromSelector(a_selector: Sel) -> *mut NSString;
        }
        let ret = unsafe { NSStringFromSelector(a_selector) };
        unsafe { Retained::retain_autoreleased(ret) }
            .expect("function was marked as returning non-null, but actually returned NULL")
    }
}

#[cfg(feature = "NSString")]
#[inline]
pub extern "C-unwind" fn NSSelectorFromString(a_selector_name: &NSString) -> Sel {
    extern "C-unwind" {
        fn NSSelectorFromString(a_selector_name: &NSString) -> Sel;
    }
    unsafe { NSSelectorFromString(a_selector_name) }
}

#[cfg(feature = "NSString")]
impl NSString {
    #[doc(alias = "NSStringFromClass")]
    #[cfg(feature = "NSString")]
    #[inline]
    pub fn from_class(a_class: &AnyClass) -> Retained<NSString> {
        extern "C-unwind" {
            fn NSStringFromClass(a_class: &AnyClass) -> *mut NSString;
        }
        let ret = unsafe { NSStringFromClass(a_class) };
        unsafe { Retained::retain_autoreleased(ret) }
            .expect("function was marked as returning non-null, but actually returned NULL")
    }
}

#[cfg(feature = "NSString")]
#[inline]
pub extern "C-unwind" fn NSClassFromString(a_class_name: &NSString) -> Option<&'static AnyClass> {
    extern "C-unwind" {
        fn NSClassFromString(a_class_name: &NSString) -> Option<&'static AnyClass>;
    }
    unsafe { NSClassFromString(a_class_name) }
}

#[cfg(feature = "NSString")]
impl NSString {
    /// # Safety
    ///
    /// `proto` possibly has further requirements.
    #[doc(alias = "NSStringFromProtocol")]
    #[cfg(feature = "NSString")]
    #[inline]
    pub unsafe fn from_protocol(proto: &AnyProtocol) -> Retained<NSString> {
        extern "C-unwind" {
            fn NSStringFromProtocol(proto: &AnyProtocol) -> *mut NSString;
        }
        let ret = unsafe { NSStringFromProtocol(proto) };
        unsafe { Retained::retain_autoreleased(ret) }
            .expect("function was marked as returning non-null, but actually returned NULL")
    }
}

#[cfg(feature = "NSString")]
#[inline]
pub extern "C-unwind" fn NSProtocolFromString(namestr: &NSString) -> Option<Retained<AnyProtocol>> {
    extern "C-unwind" {
        fn NSProtocolFromString(namestr: &NSString) -> *mut AnyProtocol;
    }
    let ret = unsafe { NSProtocolFromString(namestr) };
    unsafe { Retained::retain_autoreleased(ret) }
}

/// # Safety
///
/// - `type_ptr` must be a valid pointer.
/// - `sizep` must be a valid pointer or null.
/// - `alignp` must be a valid pointer or null.
#[inline]
pub unsafe extern "C-unwind" fn NSGetSizeAndAlignment(
    type_ptr: NonNull<c_char>,
    sizep: *mut NSUInteger,
    alignp: *mut NSUInteger,
) -> NonNull<c_char> {
    extern "C-unwind" {
        fn NSGetSizeAndAlignment(
            type_ptr: NonNull<c_char>,
            sizep: *mut NSUInteger,
            alignp: *mut NSUInteger,
        ) -> Option<NonNull<c_char>>;
    }
    let ret = unsafe { NSGetSizeAndAlignment(type_ptr, sizep, alignp) };
    ret.expect("function was marked as returning non-null, but actually returned NULL")
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nscomparator?language=objc)
#[cfg(feature = "block2")]
pub type NSComparator =
    *mut block2::DynBlock<dyn Fn(NonNull<AnyObject>, NonNull<AnyObject>) -> NSComparisonResult>;

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsenumerationoptions?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEnumerationOptions(pub NSUInteger);
bitflags::bitflags! {
    impl NSEnumerationOptions: NSUInteger {
        #[doc(alias = "NSEnumerationConcurrent")]
        const Concurrent = 1<<0;
        #[doc(alias = "NSEnumerationReverse")]
        const Reverse = 1<<1;
    }
}

unsafe impl Encode for NSEnumerationOptions {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSEnumerationOptions {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nssortoptions?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSSortOptions(pub NSUInteger);
bitflags::bitflags! {
    impl NSSortOptions: NSUInteger {
        #[doc(alias = "NSSortConcurrent")]
        const Concurrent = 1<<0;
        #[doc(alias = "NSSortStable")]
        const Stable = 1<<4;
    }
}

unsafe impl Encode for NSSortOptions {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSSortOptions {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsqualityofservice?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSQualityOfService(pub NSInteger);
impl NSQualityOfService {
    #[doc(alias = "NSQualityOfServiceUserInteractive")]
    pub const UserInteractive: Self = Self(0x21);
    #[doc(alias = "NSQualityOfServiceUserInitiated")]
    pub const UserInitiated: Self = Self(0x19);
    #[doc(alias = "NSQualityOfServiceUtility")]
    pub const Utility: Self = Self(0x11);
    #[doc(alias = "NSQualityOfServiceBackground")]
    pub const Background: Self = Self(0x09);
    #[doc(alias = "NSQualityOfServiceDefault")]
    pub const Default: Self = Self(-1);
}

unsafe impl Encode for NSQualityOfService {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for NSQualityOfService {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsnotfound?language=objc)
pub static NSNotFound: NSInteger = NSIntegerMax as _;

#[cfg(feature = "NSString")]
#[deprecated = "renamed to `NSString::from_selector`"]
#[inline]
pub unsafe extern "C-unwind" fn NSStringFromSelector(a_selector: Sel) -> Retained<NSString> {
    extern "C-unwind" {
        fn NSStringFromSelector(a_selector: Sel) -> *mut NSString;
    }
    let ret = unsafe { NSStringFromSelector(a_selector) };
    unsafe { Retained::retain_autoreleased(ret) }
        .expect("function was marked as returning non-null, but actually returned NULL")
}

#[cfg(feature = "NSString")]
#[deprecated = "renamed to `NSString::from_class`"]
#[inline]
pub extern "C-unwind" fn NSStringFromClass(a_class: &AnyClass) -> Retained<NSString> {
    extern "C-unwind" {
        fn NSStringFromClass(a_class: &AnyClass) -> *mut NSString;
    }
    let ret = unsafe { NSStringFromClass(a_class) };
    unsafe { Retained::retain_autoreleased(ret) }
        .expect("function was marked as returning non-null, but actually returned NULL")
}

#[cfg(feature = "NSString")]
#[deprecated = "renamed to `NSString::from_protocol`"]
#[inline]
pub unsafe extern "C-unwind" fn NSStringFromProtocol(proto: &AnyProtocol) -> Retained<NSString> {
    extern "C-unwind" {
        fn NSStringFromProtocol(proto: &AnyProtocol) -> *mut NSString;
    }
    let ret = unsafe { NSStringFromProtocol(proto) };
    unsafe { Retained::retain_autoreleased(ret) }
        .expect("function was marked as returning non-null, but actually returned NULL")
}
