objc2_foundation/generated/
NSDebug.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern "C" {
9    /// **************    General        ***************
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdebugenabled?language=objc)
12    pub static NSDebugEnabled: Bool;
13}
14
15extern "C" {
16    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nszombieenabled?language=objc)
17    pub static NSZombieEnabled: Bool;
18}
19
20extern "C" {
21    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdeallocatezombies?language=objc)
22    pub static NSDeallocateZombies: Bool;
23}
24
25#[inline]
26pub unsafe extern "C-unwind" fn NSIsFreedObject(an_object: Option<&AnyObject>) -> bool {
27    extern "C-unwind" {
28        fn NSIsFreedObject(an_object: Option<&AnyObject>) -> Bool;
29    }
30    unsafe { NSIsFreedObject(an_object) }.as_bool()
31}
32
33extern "C-unwind" {
34    /// **************    Stack processing    ***************
35    pub fn NSFrameAddress(frame: NSUInteger) -> *mut c_void;
36}
37
38extern "C-unwind" {
39    pub fn NSReturnAddress(frame: NSUInteger) -> *mut c_void;
40}
41
42extern "C-unwind" {
43    pub fn NSCountFrames() -> NSUInteger;
44}
45
46/// NSAutoreleasePoolDebugging.
47#[cfg(feature = "NSAutoreleasePool")]
48impl NSAutoreleasePool {
49    extern_methods!(
50        #[unsafe(method(showPools))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn showPools();
53    );
54}
55
56extern "C" {
57    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nskeepallocationstatistics?language=objc)
58    pub static NSKeepAllocationStatistics: Bool;
59}
60
61extern "C-unwind" {
62    pub fn NSRecordAllocationEvent(event_type: c_int, object: Option<&AnyObject>);
63}